mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-03 11:17:24 +00:00
changes requested by @mhils
This commit is contained in:
parent
3a78c95d0a
commit
09828ff2d9
1 changed files with 2 additions and 9 deletions
|
|
@ -162,7 +162,6 @@ def raw_format_flow(f, focus, extended, padding):
|
|||
if f["resp_ctype"]:
|
||||
resp.append(fcol(f["resp_ctype"], rc))
|
||||
resp.append(fcol(f["resp_clen"], rc))
|
||||
resp.append(fcol(f["resp_rate"], rc))
|
||||
resp.append(fcol(f["roundtrip"], rc))
|
||||
|
||||
elif f["err_msg"]:
|
||||
|
|
@ -347,21 +346,15 @@ def format_flow(f, focus, extended=False, hostheader=False, padding=2):
|
|||
else:
|
||||
contentdesc = "[no content]"
|
||||
duration = 0
|
||||
if f.response.timestamp_end:
|
||||
delta = f.response.timestamp_end - f.response.timestamp_start
|
||||
if f.request.timestamp_end:
|
||||
duration = f.response.timestamp_end - f.request.timestamp_end
|
||||
else:
|
||||
delta = 0
|
||||
if f.response.timestamp_end and f.request.timestamp_start:
|
||||
duration = f.response.timestamp_end - f.request.timestamp_start
|
||||
size = f.response.size()
|
||||
rate = utils.pretty_size(size / ( delta if delta > 0 else 1 ) )
|
||||
roundtrip = utils.pretty_duration(duration)
|
||||
|
||||
d.update(dict(
|
||||
resp_code = f.response.code,
|
||||
resp_is_replay = f.response.is_replay,
|
||||
resp_clen = contentdesc,
|
||||
resp_rate = "{0}/s".format(rate),
|
||||
roundtrip = roundtrip,
|
||||
))
|
||||
t = f.response.headers["content-type"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue