From 0ecc4b1c36c0b2b146b4a8500631e9b147a09ad7 Mon Sep 17 00:00:00 2001 From: Mitsuo Heijo Date: Sat, 4 Nov 2017 09:22:58 +0900 Subject: [PATCH] fix zlib_compressobj wbit --- test/test_http11.py | 6 +++--- test/test_hyper.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_http11.py b/test/test_http11.py index 21dd7f70..954bacd0 100644 --- a/test/test_http11.py +++ b/test/test_http11.py @@ -637,7 +637,7 @@ def test_response_transparently_decrypts_gzip(self): headers = {b'content-encoding': [b'gzip'], b'connection': [b'close']} r = HTTP11Response(200, 'OK', headers, d, None) - c = zlib_compressobj(wbits=24) + c = zlib_compressobj(wbits=25) body = c.compress(b'this is test data') body += c.flush() d._buffer = BytesIO(body) @@ -719,7 +719,7 @@ def test_response_transparently_decrypts_chunked_gzip(self): } r = HTTP11Response(200, 'OK', headers, d, None) - c = zlib_compressobj(wbits=24) + c = zlib_compressobj(wbits=25) body = c.compress(b'this is test data') body += c.flush() @@ -804,7 +804,7 @@ def test_bounded_read_expect_close_with_content_length(self): def test_compressed_bounded_read_expect_close(self): headers = {b'connection': [b'close'], b'content-encoding': [b'gzip']} - c = zlib_compressobj(wbits=24) + c = zlib_compressobj(wbits=25) body = c.compress(b'hello there sir') body += c.flush() diff --git a/test/test_hyper.py b/test/test_hyper.py index f4a5994d..7925ad65 100644 --- a/test/test_hyper.py +++ b/test/test_hyper.py @@ -1026,7 +1026,7 @@ def test_response_transparently_decrypts_gzip(self): headers = HTTPHeaderMap( [(':status', '200'), ('content-encoding', 'gzip')] ) - c = zlib_compressobj(wbits=24) + c = zlib_compressobj(wbits=25) body = c.compress(b'this is test data') body += c.flush() resp = HTTP20Response(headers, DummyStream(body)) @@ -1144,7 +1144,7 @@ def test_read_compressed_frames(self): headers = HTTPHeaderMap( [(':status', '200'), ('content-encoding', 'gzip')] ) - c = zlib_compressobj(wbits=24) + c = zlib_compressobj(wbits=25) body = c.compress(b'this is test data') body += c.flush()