fix test.helper_tools.dumperview script.

Previously, it was throwing the following error:

  File mitmproxy/addons/dumper.py, line 133, in _echo_request_line
    elif flow.client_conn.peername:
AttributeError: 'bool' object has no attribute 'peername'
This commit is contained in:
Robert Xiao 2022-02-03 03:11:30 -08:00 committed by Maximilian Hils
parent ee4999e8e4
commit e186ccb3ba

View File

@ -22,14 +22,14 @@ def cli():
@cli.command()
@click.option('--level', default=1, help='Detail level')
def tcp(level):
f1 = tflow.ttcpflow(client_conn=True, server_conn=True)
f1 = tflow.ttcpflow()
show(level, [f1])
@cli.command()
@click.option('--level', default=1, help='Detail level')
def large(level):
f1 = tflow.tflow(client_conn=True, server_conn=True, resp=True)
f1 = tflow.tflow(resp=True)
f1.response.headers["content-type"] = "text/html"
f1.response.content = b"foo bar voing\n" * 100
show(level, [f1])
@ -38,11 +38,11 @@ def large(level):
@cli.command()
@click.option('--level', default=1, help='Detail level')
def small(level):
f1 = tflow.tflow(client_conn=True, server_conn=True, resp=True)
f1 = tflow.tflow(resp=True)
f1.response.headers["content-type"] = "text/html"
f1.response.content = b"<html><body>Hello!</body></html>"
f2 = tflow.tflow(client_conn=True, server_conn=True, err=True)
f2 = tflow.tflow(err=True)
show(
level,