mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #30701 -- Updated patch_vary_headers() to handle an asterisk according to RFC 7231.
This commit is contained in:
committed by
Mariusz Felisiak
parent
7da6a28a44
commit
6805c0f99f
@@ -73,8 +73,14 @@ need to distinguish caches by the ``Accept-language`` header.
|
||||
.. function:: patch_vary_headers(response, newheaders)
|
||||
|
||||
Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object.
|
||||
``newheaders`` is a list of header names that should be in ``Vary``.
|
||||
Existing headers in ``Vary`` aren't removed.
|
||||
``newheaders`` is a list of header names that should be in ``Vary``. If
|
||||
headers contains an asterisk, then ``Vary`` header will consist of a single
|
||||
asterisk ``'*'``. Otherwise, existing headers in ``Vary`` aren't removed.
|
||||
|
||||
.. versionchanged:: 3.0
|
||||
|
||||
Handling an asterisk ``'*'`` according to :rfc:`7231#section-7.1.4` was
|
||||
added.
|
||||
|
||||
.. function:: get_cache_key(request, key_prefix=None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user