Ticket #894: response-middleware-error.patch
File response-middleware-error.patch, 1.6 KB (added by , 19 years ago) |
---|
-
wsgi.py
155 155 finally: 156 156 db.db.close() 157 157 158 # Apply response middleware159 for middleware_method in self._response_middleware:160 response = middleware_method(request, response)161 162 158 try: 163 159 status_text = STATUS_CODE_TEXT[response.status_code] 164 160 except KeyError: -
base.py
83 83 if response is None: 84 84 raise ValueError, "The view %s.%s didn't return an HttpResponse object." % (callback.__module__, callback.func_name) 85 85 86 # Apply response middleware 87 for middleware_method in self._response_middleware: 88 response = middleware_method(request, response) 89 86 90 return response 87 91 except exceptions.Http404, e: 88 92 if DEBUG: -
modpython.py
140 140 finally: 141 141 db.db.close() 142 142 143 # Apply response middleware144 for middleware_method in self._response_middleware:145 response = middleware_method(request, response)146 147 143 # Convert our custom HttpResponse object back into the mod_python req. 148 144 populate_apache_request(response, req) 149 145 return 0 # mod_python.apache.OK