mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #16004 - csrf_protect does not send cookie if view returns TemplateResponse
The root bug was in decorator_from_middleware, and the fix also corrects bugs with gzip_page and other decorators. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -133,7 +133,7 @@ class BaseHandler(object):
|
||||
if hasattr(response, 'render') and callable(response.render):
|
||||
for middleware_method in self._template_response_middleware:
|
||||
response = middleware_method(request, response)
|
||||
response.render()
|
||||
response = response.render()
|
||||
|
||||
except http.Http404, e:
|
||||
logger.warning('Not Found: %s' % request.path,
|
||||
|
||||
Reference in New Issue
Block a user