Zope 2.11b1: "BaseRequest.traverse" may fail without "__getitem__"
Bug #213311 reported by
Dieter Maurer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Undecided
|
Tres Seaver |
Bug Description
When "ZPublisher.
and the other lookup methods have failed, then a "TypeError" exception ("unsubscriptable oject")
is raised rather than a "NotFound" exception. This causes a wrong response code to be generated
("500" (internal server error) rather than "404" (not found)).
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
dmaurer wrote: BaseRequest. BaseRequest" traverses over an object without "__getitem__"
> Public bug reported:
>
> When "ZPublisher.
> and the other lookup methods have failed, then a "TypeError" exception ("unsubscriptable oject")
> is raised rather than a "NotFound" exception. This causes a wrong response code to be generated
> ("500" (internal server error) rather than "404" (not found)).
I just tried adding a testcase for this, and couldn't provoke the error:
the AttributeError on the object with no '__getitem__' got turned
into a NotFound. Can you provide a testcase?
Tres. ======= ======= ======= ======= ======= ======= ======= ======= ==== palladion. com enigmail. mozdev. org
- --
=======
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFH+ jSr+gerLs4ltQ4R Aq58AJ0SG78p47c VhpVGHYrJAk+ jzroQaACfRGU0 2pkAbH0M=
X2DxbSxGFwMp2zf
=mn4d
-----END PGP SIGNATURE-----