Ticket #820 (defect)
Opened 3 months ago
Last modified 3 months ago
start_response with exc_info raises exception even if no output was sent yet
Status: closed (fixed)
| Reported by: | guest | Assigned to: | fumanchu |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | wsgiserver | Keywords: | |
| Cc: | pstradomski@gmail.com |
According to PEP 333, start_response with exc_info should not raise exception if no output was sent yet
http://www.python.org/dev/peps/pep-0333/#error-handling
"If no output has been written when an exception occurs, the call to start_response will return normally, and the application will return an error body to be sent to the browser. However, if any output has already been sent to the browser, start_response will reraise the provided exception."
CherryPy WSGI server raises the exception for every start_response with exc_info except for the first one.
The patch is trivial: add "if self.sent_headers:" around "raise exc_inf0[0], exc_info[1], exc_info[2]"
Change History
06/07/08 16:11:11: Modified by fumanchu
- status changed from new to closed.
- resolution set to fixed.
- milestone set to 3.1.


Fixed in [1978].