diff options
author | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2016-03-27 11:14:28 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2016-03-27 11:14:28 +0200 |
commit | ddea3434a217370e5fcbfad98e4ef9c6590d8dc4 (patch) | |
tree | a2401f07785a30c8f9ca59c3011d9d055cbd9289 /mitmproxy/dump.py | |
parent | 2d6eb28fd07359a5c7d909abdee903b9758b7572 (diff) | |
parent | 6e4af64050fe9a0efbfa73193131065b96feca3c (diff) | |
download | mitmproxy-ddea3434a217370e5fcbfad98e4ef9c6590d8dc4.tar.gz mitmproxy-ddea3434a217370e5fcbfad98e4ef9c6590d8dc4.tar.bz2 mitmproxy-ddea3434a217370e5fcbfad98e4ef9c6590d8dc4.zip |
Merge pull request #1055 from MatthewShao/issue#963
Simplify '.content' by removing CONTENT_MISSING
Diffstat (limited to 'mitmproxy/dump.py')
-rw-r--r-- | mitmproxy/dump.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mitmproxy/dump.py b/mitmproxy/dump.py index 7b4609b4..631e4d2e 100644 --- a/mitmproxy/dump.py +++ b/mitmproxy/dump.py @@ -5,7 +5,6 @@ import click import itertools from netlib import tcp -from netlib.http import CONTENT_MISSING import netlib.utils from . import flow, filt, contentviews from .exceptions import ContentViewException @@ -180,7 +179,7 @@ class DumpMaster(flow.FlowMaster): ) self.echo(headers, indent=4) if self.o.flow_detail >= 3: - if message.content == CONTENT_MISSING: + if message.content is None: self.echo("(content missing)", indent=4) elif message.content: self.echo("") @@ -283,7 +282,7 @@ class DumpMaster(flow.FlowMaster): code = click.style(str(code), fg=code_color, bold=True, blink=(code == 418)) reason = click.style(flow.response.reason, fg=code_color, bold=True) - if flow.response.content == CONTENT_MISSING: + if flow.response.content is None: size = "(content missing)" else: size = netlib.utils.pretty_size(len(flow.response.content)) |