diff --git a/mitmproxy/addons/dumper.py b/mitmproxy/addons/dumper.py index 233bf8596..aeb4d2054 100644 --- a/mitmproxy/addons/dumper.py +++ b/mitmproxy/addons/dumper.py @@ -38,10 +38,10 @@ class Dumper: loader.add_option( "flow_detail", int, 1, """ - The display detail level for flows in mitmdump: 0 (almost quiet) to 3 (very verbose). - 0: shortened request URL, response status code, WebSocket and TCP message notifications. - 1: full request URL with response status code - 2: 1 + HTTP headers + The display detail level for flows in mitmdump: 0 (quiet) to 4 (very verbose). + 0: no output + 1: shortened request URL with response status code + 2: full request URL with response status code and HTTP headers 3: 2 + truncated response content, content of WebSocket and TCP messages 4: 3 + nothing is truncated """ @@ -156,7 +156,7 @@ class Dumper: else: url = flow.request.url - if ctx.options.flow_detail <= 1: + if ctx.options.flow_detail == 1: # We need to truncate before applying styles, so we just focus on the URL. terminal_width_limit = max(shutil.get_terminal_size()[0] - 25, 50) if len(url) > terminal_width_limit: diff --git a/test/mitmproxy/addons/test_dumper.py b/test/mitmproxy/addons/test_dumper.py index 5e9ed7639..a63e878a8 100644 --- a/test/mitmproxy/addons/test_dumper.py +++ b/test/mitmproxy/addons/test_dumper.py @@ -158,7 +158,7 @@ def test_echo_request_line(): assert "nonstandard" in sio.getvalue() sio.truncate(0) - ctx.configure(d, flow_detail=0, showhost=True) + ctx.configure(d, flow_detail=1, showhost=True) f = tflow.tflow(resp=True) terminalWidth = max(shutil.get_terminal_size()[0] - 25, 50) f.request.url = "http://address:22/" + ("x" * terminalWidth) + "textToBeTruncated"