From 9a885946842c5341bc3d3ffb34f21ed863ef9f76 Mon Sep 17 00:00:00 2001 From: harsh vijay Date: Mon, 13 Mar 2017 01:55:50 +0530 Subject: [PATCH 1/2] Fix crash when duplicating flow (#2) --- mitmproxy/flow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mitmproxy/flow.py b/mitmproxy/flow.py index cc5f0aedb..f48c3d9ff 100644 --- a/mitmproxy/flow.py +++ b/mitmproxy/flow.py @@ -113,7 +113,9 @@ class Flow(stateobject.StateObject): def copy(self): f = super().copy() f.id = str(uuid.uuid4()) - f.live = False + f.live = False; + if self.reply != None: + f.reply = controller.DummyReply() return f def modified(self): From a8f7c30aa027fba7ea2074ce439ed68abb76701f Mon Sep 17 00:00:00 2001 From: harsh vijay Date: Mon, 13 Mar 2017 02:23:52 +0530 Subject: [PATCH 2/2] Fix crash when duplicating flow --- mitmproxy/flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mitmproxy/flow.py b/mitmproxy/flow.py index f48c3d9ff..6b68c8b26 100644 --- a/mitmproxy/flow.py +++ b/mitmproxy/flow.py @@ -113,8 +113,8 @@ class Flow(stateobject.StateObject): def copy(self): f = super().copy() f.id = str(uuid.uuid4()) - f.live = False; - if self.reply != None: + f.live = False + if self.reply is not None: f.reply = controller.DummyReply() return f