mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #14588 -- Corrected r14393 to ensure that response middlewares are are always applied. Includes a battery of tests to validate the expected behavior of the middleware cycle. Thanks to Petr Marhoun for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -81,11 +81,6 @@ class ClientHandler(BaseHandler):
|
||||
# admin views.
|
||||
request._dont_enforce_csrf_checks = not self.enforce_csrf_checks
|
||||
response = self.get_response(request)
|
||||
|
||||
# Apply response middleware.
|
||||
for middleware_method in self._response_middleware:
|
||||
response = middleware_method(request, response)
|
||||
response = self.apply_response_fixes(request, response)
|
||||
finally:
|
||||
signals.request_finished.disconnect(close_connection)
|
||||
signals.request_finished.send(sender=self.__class__)
|
||||
|
||||
Reference in New Issue
Block a user