[Checkins] SVN: zope.server/branches/achapman-exc-info/src/zope/server/http/wsgihttpserver.py - add optional exc_info argument to start_response
Alex Chapman
achapman at zope.com
Mon May 9 16:43:51 EDT 2011
Log message for revision 121643:
- add optional exc_info argument to start_response
Changed:
U zope.server/branches/achapman-exc-info/src/zope/server/http/wsgihttpserver.py
-=-
Modified: zope.server/branches/achapman-exc-info/src/zope/server/http/wsgihttpserver.py
===================================================================
--- zope.server/branches/achapman-exc-info/src/zope/server/http/wsgihttpserver.py 2011-05-09 20:43:16 UTC (rev 121642)
+++ zope.server/branches/achapman-exc-info/src/zope/server/http/wsgihttpserver.py 2011-05-09 20:43:51 UTC (rev 121643)
@@ -76,7 +76,9 @@
"""Overrides HTTPServer.executeRequest()."""
env = self._constructWSGIEnvironment(task)
- def start_response(status, headers):
+ def start_response(status, headers, exc_info=None):
+ if exc_info:
+ raise exc_info[0], exc_info[1], exc_info[2]
# Prepare the headers for output
status, reason = re.match('([0-9]*) (.*)', status).groups()
task.setResponseStatus(status, reason)
@@ -101,7 +103,9 @@
env = self._constructWSGIEnvironment(task)
env['wsgi.handleErrors'] = False
- def start_response(status, headers):
+ def start_response(status, headers, exc_info=None):
+ if exc_info:
+ raise exc_info[0], exc_info[1], exc_info[2]
# Prepare the headers for output
status, reason = re.match('([0-9]*) (.*)', status).groups()
task.setResponseStatus(status, reason)
More information about the checkins
mailing list