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:
committed by
Tim Graham
parent
3203171832
commit
9e07a9b5fe
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user