Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

0.90-bugfixes: fix a problem on mod_python that could result in stale…

… DB connections

git-svn-id: http://code.djangoproject.com/svn/django/branches/0.90-bugfixes@3726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b2f1f380b31a029c7f2882ff1ebeb6f044a02381 1 parent 6eefa52
@ubernostrum ubernostrum authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 django/core/handlers/modpython.py
View
7 django/core/handlers/modpython.py
@@ -137,13 +137,12 @@ def __call__(self, req):
try:
request = ModPythonRequest(req)
response = self.get_response(req.uri, 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)
-
# Convert our custom HttpResponse object back into the mod_python req.
populate_apache_request(response, req)
return 0 # mod_python.apache.OK
Please sign in to comment.
Something went wrong with that request. Please try again.