summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-08-24 18:08:05 +0200
committerClaude Paroz <claude@2xlibre.net>2013-08-24 18:10:12 +0200
commitf4e9804567ce45ef01f6613ce194e96d293ac04b (patch)
treef4854553ac93764ad7852eec295750d86bf11090 /tests
parentf33db5a09acfc3df3085235a5712c46094eb9a0d (diff)
Fixed #20961 -- Fixed HttpResponse default empty content
Thanks epandurski at gmail.com for the report.
Diffstat (limited to 'tests')
-rw-r--r--tests/httpwrappers/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
index 1679b6e036..4ee342c252 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -385,6 +385,13 @@ class HttpResponseTests(unittest.TestCase):
self.assertEqual(r.tell(), 6)
self.assertEqual(r.content, b'abcdef')
+ # with Content-Encoding header
+ r = HttpResponse()
+ r['Content-Encoding'] = 'winning'
+ r.write(b'abc')
+ r.write(b'def')
+ self.assertEqual(r.content, b'abcdef')
+
def test_unsafe_redirect(self):
bad_urls = [
'data:text/html,<script>window.alert("xss")</script>',