Get raw (unzipped) HTML when export using mitmdump -w filename (zlib)

Hi all,

We know that mitmproxy have ability to decode gzip content in mitmproxy/netlib/, the decode is using zlib.
When I try to export the flows to file withmitmdump -w filename, the file content is compressed and not readable. Is there a built-in way to get the unzipped content in exported file? Or is there a way to make zlib work on the file exporting process?

I am trying to figure out the same thing. Has this been resolved?

I would recommend using to read mitmproxy dumpfiles. mitmproxy’s flow.response.content is automatically gzip-decoded (see If you want to avoid encodings at all, you could also pass --anticomp when recording. Does that help? :slight_smile: