[Zope-Coders] Re: Changes to ZPublisher

Sidnei da Silva sidnei at awkly.org
Wed Oct 13 09:33:24 EDT 2004


| The publisher's job has always been to mediate between what the protocl 
| (HTTP) expects, and what the application delivers.  In this case, the 
| difference is between having the HTTP response code be 404, or having it 
| be 500.  Making either choice is DWIM ("do what I mean");  it happens to
| be consistent with the other publisher code (immediately following the
| test for __bobo_traverse__) to treat it as a 404 instead of a 500.
| 
| In debug mode, we should prefer a 500, because it preserves the original
| exception information;  this is the current behavior for errors raised 
| from getattr / getitem, and would be the behavior under Sidnei's 
| proposed change.

That's correct.

The thread seems to have died here, and I don't think we came to a
consensus if it should be merged to 2.7 and trunk or just trunk.

IMHO, the change has minimal impact, as no-one sane would be depending
on an AttributeError/KeywordError raised inside __bobo_traverse__ when
called from ZPublisher to result in a 500 error code instead of 404
(which is what it boils down to after all). As Tres mentioned, in
debug mode it will have the same behavior as getattr/getitem so that
should be enough for pleasing developers.

-- 
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

<sjj> dash: you certainly are an enigma wrapped in a riddle wrapped in a hat.


More information about the Zope-Coders mailing list