mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #9163 - CsrfMiddleware needs to reset ETag header
Thanks to carljm for report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c44fdf6a1e
commit
a02a6fab66
2 changed files with 13 additions and 7 deletions
|
@ -22,12 +22,12 @@ middleware into your list of installed middleware.
|
|||
How to use it
|
||||
=============
|
||||
|
||||
Add the middleware ``'django.contrib.csrf.middleware.CsrfMiddleware'`` to
|
||||
your list of middleware classes, :setting:`MIDDLEWARE_CLASSES`. It needs to process
|
||||
the response after the SessionMiddleware, so must come before it in the
|
||||
list. It also must process the response before things like compression
|
||||
happen to the response, so it must come after GZipMiddleware in the
|
||||
list.
|
||||
Add the middleware ``'django.contrib.csrf.middleware.CsrfMiddleware'`` to your
|
||||
list of middleware classes, :setting:`MIDDLEWARE_CLASSES`. It needs to process
|
||||
the response after the SessionMiddleware, so must come before it in the list. It
|
||||
also must process the response before things like compression or setting of
|
||||
ETags happen to the response, so it must come after GZipMiddleware,
|
||||
CommonMiddleware and ConditionalGetMiddleware in the list.
|
||||
|
||||
The ``CsrfMiddleware`` class is actually composed of two middleware:
|
||||
``CsrfViewMiddleware`` which performs the checks on incoming requests,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue