Ticket #397 (new defect)
Opened 2 years ago
errormiddleware does not return result of start_response
| Reported by: | kalmes | Owned by: | ianb |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.1 |
| Component: | paste | Version: | svn-trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
start_response returns a writer that may be used to begin writing response content. Unfortunately, ResponseStartChecker does not return the result of start_response, and prevents this from working. This causes problems when wrapping paste.cgiapp.CGIApplication for instance.
It would be nice to provide a wrapper for the writer function. But even without going that far, ReponseStartChecker._ _call_ _ can be fixed by changing:
self.response_started = True
self.start_response(*args)
to:
self.response_started = True
return self.start_response(*args)
(I am new to wsgi development, so please correct me if I am misunderstanding.)
Note: See
TracTickets for help on using
tickets.
