quixote publish.py,1.138,1.139
Greg Ward <gward-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]>
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/cvs/quixote
In directory hewson:/tmp/cvs-serv30266
Modified Files:
publish.py
Log Message:
Turns out that calling _clear_request() from process_request() was a
dumb idea, because self._request might be needed later (eg. to emit an
error page when an exception is caught). Call it from publish()
instead, as the very last thing -- after we write the response.
Index: publish.py
===================================================================
RCS file: /home/cvs/quixote/publish.py,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- publish.py 16 Oct 2002 19:19:17 -0000 1.138
+++ publish.py 17 Oct 2002 15:08:10 -0000 1.139
@@ -639,12 +639,7 @@
exceptions will be handled here.
"""
self._set_request(request)
-
- try:
- output = self.try_publish(request, env.get('PATH_INFO', ''))
- finally:
- self._clear_request()
-
+ output = self.try_publish(request, env.get('PATH_INFO', ''))
self.log_request(request)
if output and self.config.compress_pages:
@@ -674,6 +669,7 @@
if output:
request.response.set_body(str(output))
request.response.write(stdout)
+ self._clear_request()
def publish_cgi (self):