diff options
author | birthdaysgift <most-208@yandex.ru> | 2019-03-18 18:15:06 +0300 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2019-03-21 18:02:49 -0400 |
commit | dc740dde50873e82f761386fd73ca17d9eaa008b (patch) | |
tree | c838e89d275fedf91793bf64d798ebdd547a11cd /tests/sessions_tests | |
parent | d64808cacdd93db71c0be18d8d110f9dbf60d4f6 (diff) | |
download | django-dc740dde50873e82f761386fd73ca17d9eaa008b.tar.gz |
Fixed #29471 -- Added 'Vary: Cookie' to invalid/empty session cookie responses.
Diffstat (limited to 'tests/sessions_tests')
-rw-r--r-- | tests/sessions_tests/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/sessions_tests/tests.py b/tests/sessions_tests/tests.py index 0e8cb79fd5..e9896dc18a 100644 --- a/tests/sessions_tests/tests.py +++ b/tests/sessions_tests/tests.py @@ -748,6 +748,9 @@ class SessionMiddlewareTests(TestCase): ), str(response.cookies[settings.SESSION_COOKIE_NAME]) ) + # SessionMiddleware sets 'Vary: Cookie' to prevent the 'Set-Cookie' + # from being cached. + self.assertEqual(response['Vary'], 'Cookie') @override_settings(SESSION_COOKIE_DOMAIN='.example.local', SESSION_COOKIE_PATH='/example/') def test_session_delete_on_end_with_custom_domain_and_path(self): |