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
1: #----------------------------------------------------------------------
def response(self, flow):
# Gather outgoing data size
if flow.response.content:
self.outgoing_data_size += len(flow.response.raw_content)
2. Go to google.com and search "test"
3. Red text flys by saying:
Script error: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/mitmproxy/net/http/encoding.py", line 48, in decode
decoded = custom_decodeencoding
KeyError: 'sdch, gzip'
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 791, in response
if flow.response.content:
File "/usr/local/lib/python3.5/dist-packages/mitmproxy/net/http/message.py", line 97, in get_content
content = encoding.decode(self.raw_content, ce)
File "/usr/local/lib/python3.5/dist-packages/mitmproxy/net/http/encoding.py", line 61, in decode
repr(e),
ValueError: LookupError when decoding b'\x1f\x8b with 'sdch, gzip': LookupError('unknown encoding: sdch, gzip',)
Any other comments? What have you tried so far?
Looks like gzip is supported, but I don't see anything about sdch. Looks to be missing
Now that's a bit confusing - my understanding is that the Content-Encoding header names the agreed-on encoding, so it shouldn't be a list. Can you share a mitmproxy dump file with a flow that has this issue?
Maybe not what you are looking for. Sorry, but willing to work to report this issue. Just let me know "where" you want me to get images or log files at.
Activity
mhils commentedon Apr 21, 2017
Now that's a bit confusing - my understanding is that the
Content-Encodingheader names the agreed-on encoding, so it shouldn't be a list. Can you share a mitmproxy dump file with a flow that has this issue?Mradr commentedon Apr 22, 2017
Maybe not what you are looking for. Sorry, but willing to work to report this issue. Just let me know "where" you want me to get images or log files at.

mhils commentedon Apr 26, 2017
Thanks.
@cortesi: is it right that we do not call
request.constrain_encoding()on flows by default?mhils commentedon Oct 25, 2017
Pretty sure this is an error and we should do that.