diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-05-12 09:41:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-05-12 09:41:34 -0400 |
| commit | 4001ec8698f577b973c5a540801d8a0bbea1205b (patch) | |
| tree | 1da5b3e1086e510ba02a8ff68cfdcd9da88e4790 /tests/regressiontests | |
| parent | 41ab97b6a4e785a35b6199134aad39091b6b1aab (diff) | |
[1.5.x] Dropped fix_IE_for_vary/attach.
This is a security fix. Disclosure following shortly.
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/utils/http.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/regressiontests/utils/http.py b/tests/regressiontests/utils/http.py index 6d3bc025af..03706ca68d 100644 --- a/tests/regressiontests/utils/http.py +++ b/tests/regressiontests/utils/http.py @@ -67,50 +67,6 @@ class TestUtilsHttp(unittest.TestCase): ] self.assertTrue(result in acceptable_results) - def test_fix_IE_for_vary(self): - """ - Regression for #16632. - - `fix_IE_for_vary` shouldn't crash when there's no Content-Type header. - """ - - # functions to generate responses - def response_with_unsafe_content_type(): - r = HttpResponse(content_type="text/unsafe") - r['Vary'] = 'Cookie' - return r - - def no_content_response_with_unsafe_content_type(): - # 'Content-Type' always defaulted, so delete it - r = response_with_unsafe_content_type() - del r['Content-Type'] - return r - - # request with & without IE user agent - rf = RequestFactory() - request = rf.get('/') - ie_request = rf.get('/', HTTP_USER_AGENT='MSIE') - - # not IE, unsafe_content_type - response = response_with_unsafe_content_type() - utils.fix_IE_for_vary(request, response) - self.assertTrue('Vary' in response) - - # IE, unsafe_content_type - response = response_with_unsafe_content_type() - utils.fix_IE_for_vary(ie_request, response) - self.assertFalse('Vary' in response) - - # not IE, no_content - response = no_content_response_with_unsafe_content_type() - utils.fix_IE_for_vary(request, response) - self.assertTrue('Vary' in response) - - # IE, no_content - response = no_content_response_with_unsafe_content_type() - utils.fix_IE_for_vary(ie_request, response) - self.assertFalse('Vary' in response) - def test_base36(self): # reciprocity works for n in [0, 1, 1000, 1000000]: |
