Hi, I got problem when our client sent compressed payload in gzip
to reproduce, I create json file then compress it using gzip then I sent it through curl
curl -X POST -d @test/payload.json.gz http://localhost:8000
when I try decompress using zlib.decompress, I got this exception
body = zlib.decompress(body_request.body)
zlib.error: Error -3 while decompressing data: incorrect header check
when I switch using gzip, still got exceptions
body = gzip.decompress(body_request.body)
File “/usr/lib/python3.10/gzip.py”, line 557, in decompress
File “/usr/lib/python3.10/gzip.py”, line 301, in read
File “/usr/lib/python3.10/_compression.py”, line 118, in readall
while data := self.read(sys.maxsize):
File “/usr/lib/python3.10/gzip.py”, line 507, in read
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached
any suggestions to solve this issue?