You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mitmweb fails to decode br content when editing. #4809
In my browser I see the request to get the content data: http://127.0.0.1:8081/flows/<flow-id>/response/content.data is made with Accept-Encoding: gzip, deflate though my browser supports Brotli.
Yeah, this is a good point! It's usually not a problem because the are few encodings used in practice that are not supported by modern browsers, but the way we currently handle things is less than ideal.
Activity
mhils commentedon Sep 16, 2021
Yeah, this is a good point! It's usually not a problem because the are few encodings used in practice that are not supported by modern browsers, but the way we currently handle things is less than ideal.
This dance we do here is stupid:
mitmproxy/mitmproxy/tools/web/app.py
Lines 442 to 445 in 667d4e0
Instead we should just use
.contentinstead of.raw_contentand let mitmproxy handle the decompression server-side.matthewhughes934 commentedon Sep 16, 2021
👍 I was confused in my case, since Firefox does support Brotli encoding, but I think it's due to https://bugzilla.mozilla.org/show_bug.cgi?id=1218924 i.e. Brotli only supported on HTTPS requests and I was accessing mitmweb over
httpI'd be interested in attempting this
mhils commentedon Sep 16, 2021
Please, go ahead! If you have any questions please don't hesistate to ask here or ping me on Slack. 😃
mitmweb: handle {en,de}coding on server-side
matthewhughes934 commentedon Sep 18, 2021
Thanks, I had a shot at this with #4811
mitmweb: handle {en,de}coding on server-side (#4811)
matthewhughes934 commentedon Sep 24, 2021
Resolved with #4811