Ticket #1237: wsgi.py.diff
File wsgi.py.diff, 906 bytes (added by , 19 years ago) |
---|
-
wsgi.py
149 149 # settings weren't available. 150 150 if self._request_middleware is None: 151 151 self.load_middleware() 152 152 153 153 try: 154 154 request = WSGIRequest(environ) 155 155 response = self.get_response(request.path, request) 156 157 # Apply response middleware 158 for middleware_method in self._response_middleware: 159 response = middleware_method(request, response) 156 160 finally: 157 161 db.db.close() 158 162 159 # Apply response middleware160 for middleware_method in self._response_middleware:161 response = middleware_method(request, response)162 163 163 try: 164 164 status_text = STATUS_CODE_TEXT[response.status_code] 165 165 except KeyError: