Fixed #23755 -- Added support for multiple field names in the no-cache Cache-Control directive to patch_cache_control().

https://tools.ietf.org/html/rfc7234#section-5.2.2.2
This commit is contained in:
Flavio Curella 2019-09-26 13:58:14 -07:00 committed by Mariusz Felisiak
parent 2a6f45e08e
commit ed112fadc1
5 changed files with 43 additions and 8 deletions

View file

@ -1705,6 +1705,12 @@ class CacheUtils(SimpleTestCase):
('', {'no-cache': 'Set-Cookie'}, {'no-cache=Set-Cookie'}),
('no-cache=Set-Cookie', {'no_cache': True}, {'no-cache'}),
('no-cache=Set-Cookie,no-cache=Link', {'no_cache': True}, {'no-cache'}),
('no-cache=Set-Cookie', {'no_cache': 'Link'}, {'no-cache=Set-Cookie', 'no-cache=Link'}),
(
'no-cache=Set-Cookie,no-cache=Link',
{'no_cache': 'Custom'},
{'no-cache=Set-Cookie', 'no-cache=Link', 'no-cache=Custom'},
),
# Test whether private/public attributes are mutually exclusive
('private', {'private': True}, {'private'}),
('private', {'public': True}, {'public'}),