diff options
author | Justus Wingert <justus@abi007.info> | 2014-11-15 21:14:50 +0100 |
---|---|---|
committer | Justus Wingert <justus@abi007.info> | 2014-11-15 21:14:50 +0100 |
commit | 4227feef37b9a9c0e835ebf179b5fb7a4509569e (patch) | |
tree | e7dad33b51a386d840a1711c34e352979e02c291 /examples/har_extractor.py | |
parent | 4342d79dc073277b51effda92179ad7050bebf68 (diff) | |
download | mitmproxy-4227feef37b9a9c0e835ebf179b5fb7a4509569e.tar.gz mitmproxy-4227feef37b9a9c0e835ebf179b5fb7a4509569e.tar.bz2 mitmproxy-4227feef37b9a9c0e835ebf179b5fb7a4509569e.zip |
It seems get_decoded_content can actually be shorter than content due to encoding issues. Since I'm not crazy after all it seems safe to push.
Diffstat (limited to 'examples/har_extractor.py')
-rw-r--r-- | examples/har_extractor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py index 68fb1d0d..4de8ce6a 100644 --- a/examples/har_extractor.py +++ b/examples/har_extractor.py @@ -126,7 +126,7 @@ def response(context, flow): response_headers = [{"name": k, "value": v} for k, v in flow.response.headers] response_headers_size = len(str(flow.response.headers)) response_body_size = len(flow.response.content) - response_body_decoded_size = len(flow.response.content) + response_body_decoded_size = len(flow.response.get_decoded_content()) response_body_compression = response_body_decoded_size - response_body_size response_mime_type = flow.response.headers.get('Content-Type', [''])[0] response_redirect_url = flow.response.headers.get('Location', [''])[0] |