Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 9610ed5

Browse files
authored
Merge pull request #361 from johejo/fix/zlib_compressobj_wbits
fix zlib_compressobj wbit
2 parents 86642e6 + 0ecc4b1 commit 9610ed5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/test_http11.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def test_response_transparently_decrypts_gzip(self):
637637
headers = {b'content-encoding': [b'gzip'], b'connection': [b'close']}
638638
r = HTTP11Response(200, 'OK', headers, d, None)
639639

640-
c = zlib_compressobj(wbits=24)
640+
c = zlib_compressobj(wbits=25)
641641
body = c.compress(b'this is test data')
642642
body += c.flush()
643643
d._buffer = BytesIO(body)
@@ -719,7 +719,7 @@ def test_response_transparently_decrypts_chunked_gzip(self):
719719
}
720720
r = HTTP11Response(200, 'OK', headers, d, None)
721721

722-
c = zlib_compressobj(wbits=24)
722+
c = zlib_compressobj(wbits=25)
723723
body = c.compress(b'this is test data')
724724
body += c.flush()
725725

@@ -804,7 +804,7 @@ def test_bounded_read_expect_close_with_content_length(self):
804804
def test_compressed_bounded_read_expect_close(self):
805805
headers = {b'connection': [b'close'], b'content-encoding': [b'gzip']}
806806

807-
c = zlib_compressobj(wbits=24)
807+
c = zlib_compressobj(wbits=25)
808808
body = c.compress(b'hello there sir')
809809
body += c.flush()
810810

test/test_hyper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ def test_response_transparently_decrypts_gzip(self):
10261026
headers = HTTPHeaderMap(
10271027
[(':status', '200'), ('content-encoding', 'gzip')]
10281028
)
1029-
c = zlib_compressobj(wbits=24)
1029+
c = zlib_compressobj(wbits=25)
10301030
body = c.compress(b'this is test data')
10311031
body += c.flush()
10321032
resp = HTTP20Response(headers, DummyStream(body))
@@ -1144,7 +1144,7 @@ def test_read_compressed_frames(self):
11441144
headers = HTTPHeaderMap(
11451145
[(':status', '200'), ('content-encoding', 'gzip')]
11461146
)
1147-
c = zlib_compressobj(wbits=24)
1147+
c = zlib_compressobj(wbits=25)
11481148
body = c.compress(b'this is test data')
11491149
body += c.flush()
11501150

0 commit comments

Comments
 (0)