From 1c4f4c2494a97d0088e48405c1f8f4f48846f180 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 24 Dec 2014 01:07:57 +0100 Subject: web: duplicate, delete, replay flows --- libmproxy/protocol/primitives.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libmproxy/protocol') diff --git a/libmproxy/protocol/primitives.py b/libmproxy/protocol/primitives.py index 49c71c9f..11ebb97f 100644 --- a/libmproxy/protocol/primitives.py +++ b/libmproxy/protocol/primitives.py @@ -96,6 +96,8 @@ class Flow(stateobject.StateObject): def copy(self): f = copy.copy(self) + f.id = str(uuid.uuid4()) + f.live = False f.client_conn = self.client_conn.copy() f.server_conn = self.server_conn.copy() @@ -142,6 +144,8 @@ class Flow(stateobject.StateObject): Intercept this Flow. Processing will stop until accept_intercept is called. """ + if self.intercepted: + return self.intercepted = True master.handle_intercept(self) @@ -149,6 +153,8 @@ class Flow(stateobject.StateObject): """ Continue with the flow - called after an intercept(). """ + if not self.intercepted: + return self.intercepted = False self.reply() master.handle_accept_intercept(self) -- cgit v1.2.3