summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-05-12 09:37:44 -0400
committerFlorian Apolloner <florian@apolloner.eu>2014-05-14 10:15:06 +0200
commit1abcf3a808b35abae5d425ed4d44cb6e886dc769 (patch)
tree48dabd257b4947258c33773702074716e9fac615 /tests
parente05a6222cd409bbfd9fd060a3913a956014dc4ab (diff)
[1.6.x] Dropped fix_IE_for_vary/attach.
This is a security fix. Disclosure following shortly.
Diffstat (limited to 'tests')
-rw-r--r--tests/utils_tests/test_http.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py
index c9959918a2..3da279d4a2 100644
--- a/tests/utils_tests/test_http.py
+++ b/tests/utils_tests/test_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]: