Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.91-bugfixes: Move request middleware into the handler's try/catch b…

…lock so we can deal with exceptions it throws

git-svn-id: http://code.djangoproject.com/svn/django/branches/0.91-bugfixes@4097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1fcef7a07e3fd074f5763daf35a17e415e9fa863 1 parent 3720a12
@ubernostrum ubernostrum authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 django/core/handlers/base.py
View
12 django/core/handlers/base.py
@@ -55,14 +55,14 @@ def get_response(self, path, request):
# Reset query list per request.
db.db.queries = []
- # Apply request middleware
- for middleware_method in self._request_middleware:
- response = middleware_method(request)
- if response:
- return response
-
resolver = urlresolvers.RegexURLResolver(r'^/', ROOT_URLCONF)
try:
+ # Apply request middleware
+ for middleware_method in self._request_middleware:
+ response = middleware_method(request)
+ if response:
+ return response
+
callback, callback_args, callback_kwargs = resolver.resolve(path)
# Apply view middleware
Please sign in to comment.
Something went wrong with that request. Please try again.