summaryrefslogtreecommitdiff
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 13:01:06 -0500
commitafcde50497983ec48020600345367e161f6ff9c3 (patch)
tree0c29a151ffd2812ac899378eddb8a3a463e36cfc
parent67316720603821ebb64dfe8fa592ba6edcef5f3e (diff)
[1.11.x] Fixed #28786 -- Doc'd middleware ordering considerations due to CommonMiddleware setting Content-Length.
Backport of bc95314ca6af0b5e993ae07fdc7d8e6166d3b8ca from master
-rw-r--r--docs/releases/1.11.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt
index 3da71a0dd7..5b6b17a012 100644
--- a/docs/releases/1.11.txt
+++ b/docs/releases/1.11.txt
@@ -727,6 +727,12 @@ Miscellaneous
``Content-Length`` header as this is now done by
:class:`~django.middleware.common.CommonMiddleware`.
+ If you have a middleware that modifies a response's content and appears
+ before ``CommonMiddleware`` in the ``MIDDLEWARE`` or ``MIDDLEWARE_CLASSES``
+ settings, you must reorder your middleware so that responses aren't modified
+ after ``Content-Length`` is set, or have the response modifying middleware
+ reset the ``Content-Length`` header.
+
* :meth:`~django.apps.AppConfig.get_model` and
:meth:`~django.apps.AppConfig.get_models` now raise
:exc:`~django.core.exceptions.AppRegistryNotReady` if they're called before