aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/flow.py1
-rw-r--r--test/mitmproxy/test_flow.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/mitmproxy/flow.py b/mitmproxy/flow.py
index fbf102b5..781ea150 100644
--- a/mitmproxy/flow.py
+++ b/mitmproxy/flow.py
@@ -845,6 +845,7 @@ class FlowMaster(controller.Master):
s = ServerConnection.from_state(dict(
address=dict(address=(host, port), use_ipv6=False),
+ peer_address=None,
cert=None,
sni=host,
source_address=dict(address=('', 0), use_ipv6=False),
diff --git a/test/mitmproxy/test_flow.py b/test/mitmproxy/test_flow.py
index 2353935b..926564a2 100644
--- a/test/mitmproxy/test_flow.py
+++ b/test/mitmproxy/test_flow.py
@@ -809,6 +809,11 @@ class TestFlowMaster:
assert s.flow_count() == 2
assert s.index(f2) == 1
+ def test_create_flow(self):
+ s = flow.State()
+ fm = flow.FlowMaster(None, s)
+ assert fm.create_request("GET", "http", "example.com", 80, "/")
+
def test_all(self):
s = flow.State()
fm = flow.FlowMaster(None, s)