Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[0.91-bugfixes] Fixed, once again, the stale-db connection problem. S…

…eems [3725] wasn't applied to the wsgi handler

git-svn-id: http://code.djangoproject.com/svn/django/branches/0.91-bugfixes@7155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2c03839d79c6990bd5a9ae3c0f0d8bba28c1c857 1 parent 8bc36e7
@jacobian jacobian authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 django/core/handlers/wsgi.py
View
7 django/core/handlers/wsgi.py
@@ -178,13 +178,12 @@ def __call__(self, environ, start_response):
try:
request = WSGIRequest(environ)
response = self.get_response(request.path, request)
+ # Apply response middleware
+ for middleware_method in self._response_middleware:
+ response = middleware_method(request, response)
finally:
db.db.close()
- # Apply response middleware
- for middleware_method in self._response_middleware:
- response = middleware_method(request, response)
-
try:
status_text = STATUS_CODE_TEXT[response.status_code]
except KeyError:
Please sign in to comment.
Something went wrong with that request. Please try again.