1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #27226 -- Removed patch_response_headers()'s setting of the Last-Modified header.

This commit is contained in:
Rinat Khabibiev
2016-09-15 11:10:21 +03:00
committed by Tim Graham
parent 3203171832
commit 9e07a9b5fe
4 changed files with 18 additions and 8 deletions

View File

@@ -528,15 +528,16 @@ return a cached GET response for HEAD request.
Additionally, ``UpdateCacheMiddleware`` automatically sets a few headers in each
:class:`~django.http.HttpResponse`:
* Sets the ``Last-Modified`` header to the current date/time when a fresh
(not cached) version of the page is requested.
* Sets the ``Expires`` header to the current date/time plus the defined
:setting:`CACHE_MIDDLEWARE_SECONDS`.
* Sets the ``Cache-Control`` header to give a max age for the page --
again, from the :setting:`CACHE_MIDDLEWARE_SECONDS` setting.
.. versionchanged:: 1.11
In older versions, the ``Last-Modified`` header was also set.
See :doc:`/topics/http/middleware` for more on middleware.
If a view sets its own cache expiry time (i.e. it has a ``max-age`` section in