summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-11-08 10:02:30 -0500
committerTim Graham <timograham@gmail.com>2017-11-14 12:57:18 -0500
commit3f372ef9d3a646a5c50599c001e472be074b5833 (patch)
treeb978411996ec0866f21e0c9675dad62fff819135 /docs/ref
parentca0a9c938f3c0f165fe1e6d805c2d5d0541236aa (diff)
[2.0.x] Fixed #28786 -- Doc'd middleware ordering considerations due to CommonMiddleware setting Content-Length.
Backport of bc95314ca6af0b5e993ae07fdc7d8e6166d3b8ca from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/middleware.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt
index 5c33d196d3..9a373d076d 100644
--- a/docs/ref/middleware.txt
+++ b/docs/ref/middleware.txt
@@ -488,7 +488,9 @@ Here are some hints about the ordering of various Django middleware classes:
#. :class:`~django.middleware.common.CommonMiddleware`
- Before any middleware that may change the response (it calculates ``ETags``).
+ Before any middleware that may change the response (it sets the ``ETag`` and
+ ``Content-Length`` headers). A middleware that appears before
+ ``CommonMiddleware`` and changes the response must reset the headers.
After ``GZipMiddleware`` so it won't calculate an ``ETag`` header on gzipped
contents.