aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/dump.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-28 13:54:53 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-28 13:54:53 +0200
commitc11ab3676dee2a490994665e867bcfcb26945777 (patch)
treef898c23973b10079fa4479238d5f8f5a8e61d46e /libmproxy/dump.py
parent6661770d4eee3eab3305793613586f3684c24ae9 (diff)
parent6075957a9730c6ca5c4c7361bd774345f83d6f59 (diff)
downloadmitmproxy-c11ab3676dee2a490994665e867bcfcb26945777.tar.gz
mitmproxy-c11ab3676dee2a490994665e867bcfcb26945777.tar.bz2
mitmproxy-c11ab3676dee2a490994665e867bcfcb26945777.zip
Merge branch 'http-models'
Diffstat (limited to 'libmproxy/dump.py')
-rw-r--r--libmproxy/dump.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/libmproxy/dump.py b/libmproxy/dump.py
index 3915d4c8..d2b130f1 100644
--- a/libmproxy/dump.py
+++ b/libmproxy/dump.py
@@ -174,15 +174,15 @@ class DumpMaster(flow.FlowMaster):
)
self.echo(headers, indent=4)
if self.o.flow_detail >= 3:
- if message.body == CONTENT_MISSING:
+ if message.content == CONTENT_MISSING:
self.echo("(content missing)", indent=4)
- elif message.body:
+ elif message.content:
self.echo("")
try:
type, lines = contentviews.get_content_view(
contentviews.get("Auto"),
- message.body,
+ message.content,
headers=message.headers
)
except ContentViewException:
@@ -190,7 +190,7 @@ class DumpMaster(flow.FlowMaster):
self.add_event(s, "debug")
type, lines = contentviews.get_content_view(
contentviews.get("Raw"),
- message.body,
+ message.content,
headers=message.headers
)
@@ -241,7 +241,11 @@ class DumpMaster(flow.FlowMaster):
DELETE="red"
).get(method.upper(), "magenta")
method = click.style(method, fg=method_color, bold=True)
- url = click.style(flow.request.pretty_url(self.showhost), bold=True)
+ if self.showhost:
+ url = flow.request.pretty_url
+ else:
+ url = flow.request.url
+ url = click.style(url, bold=True)
line = "{stickycookie}{client} {method} {url}".format(
stickycookie=stickycookie,
@@ -266,7 +270,7 @@ class DumpMaster(flow.FlowMaster):
elif 400 <= code < 600:
code_color = "red"
code = click.style(str(code), fg=code_color, bold=True, blink=(code == 418))
- msg = click.style(flow.response.msg, fg=code_color, bold=True)
+ reason = click.style(flow.response.reason, fg=code_color, bold=True)
if flow.response.content == CONTENT_MISSING:
size = "(content missing)"
@@ -276,11 +280,11 @@ class DumpMaster(flow.FlowMaster):
arrows = click.style("<<", bold=True)
- line = "{replay} {arrows} {code} {msg} {size}".format(
+ line = "{replay} {arrows} {code} {reason} {size}".format(
replay=replay,
arrows=arrows,
code=code,
- msg=msg,
+ reason=reason,
size=size
)
self.echo(line)