diff --git a/test/cgi/chunked_deflate.py b/test/cgi/chunked_deflate.py index 45f06828..5300c575 100755 --- a/test/cgi/chunked_deflate.py +++ b/test/cgi/chunked_deflate.py @@ -1,9 +1,11 @@ #!/usr/bin/env python -import os, time, zlib +import os, time +from zlib import * data1 = 'Two lines should be visible.
The second line.' -cd1 = zlib.compress(data1) - +ob = compressobj(Z_DEFAULT_COMPRESSION, DEFLATED, -MAX_WBITS) +cd1 = ob.compress(data1) +cd1 += ob.flush() length = len(cd1) next_chunk = hex(length - 10)[2:]