[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/HTTP - BrowserPayload.py:1.1.2.8
Guido van Rossum
guido@python.org
Thu, 13 Dec 2001 17:08:33 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/HTTP
In directory cvs.zope.org:/tmp/cvs-serv17005
Modified Files:
Tag: Zope-3x-branch
BrowserPayload.py
Log Message:
handleException(): Don't set WWW-Authenticate header for Unauthorized
exception; don't set HTTP response status code based on exception.
=== Zope3/lib/python/Zope/Publisher/HTTP/BrowserPayload.py 1.1.2.7 => 1.1.2.8 ===
response.redirect(v.getLocation())
return
- elif issubclass(t, Unauthorized):
- response.setHeader('WWW-Authenticate', 'basic realm="%s"'
- % response.realm, 1)
- title = 'You are not authorized to access this resource.'
else:
title = tname = str(t)
- response.setStatus(tname)
+ # XXX how should apps control the HTTP status code?
+ ##response.setStatus(tname)
tb = escape(traceback_string(t, v, exc_info[2]))
body = self._html(title, "<pre>\n%s\n</pre>" % tb)
response.setBody(body)