Author: jacob
Date: 2008-02-25 12:02:13 -0600 (Mon, 25 Feb 2008)
New Revision: 7155

Modified:
   django/branches/0.91-bugfixes/django/core/handlers/wsgi.py
Log:
Fixed, once again, the stale-db connection problem. Seems [3725] wasn't applied 
to the wsgi handler.

Modified: django/branches/0.91-bugfixes/django/core/handlers/wsgi.py
===================================================================
--- django/branches/0.91-bugfixes/django/core/handlers/wsgi.py  2008-02-25 
06:17:16 UTC (rev 7154)
+++ django/branches/0.91-bugfixes/django/core/handlers/wsgi.py  2008-02-25 
18:02:13 UTC (rev 7155)
@@ -178,13 +178,12 @@
         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:


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to