Fixed #27345 -- Stopped setting the Date header in ConditionalGetMiddleware.

This commit is contained in:
Tim Graham 2016-10-14 08:02:19 -04:00
parent b679a3cdb1
commit 61f9243e51
4 changed files with 8 additions and 12 deletions

View file

@ -181,11 +181,12 @@ header, the middleware adds one if needed. If the response has a ``ETag`` or
``If-Modified-Since``, the response is replaced by an
:class:`~django.http.HttpResponseNotModified`.
Also sets the ``Date`` and ``Content-Length`` response-headers.
Also sets ``Content-Length`` response-header.
.. versionchanged:: 1.11
In older versions, the middleware didn't set the ``ETag`` header.
In older versions, the middleware set the ``Date`` header and didn't set
the ``ETag`` header.
Locale middleware
-----------------

View file

@ -559,6 +559,9 @@ Miscellaneous
* In the admin templates, ``<p class="help">`` is replaced with a ``<div>`` tag
to allow including lists inside help text.
* ``ConditionalGetMiddleware`` no longer sets the ``Date`` header as Web
servers set that header.
.. _deprecated-features-1.11:
Features deprecated in 1.11