diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-12-24 01:07:57 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-12-24 01:07:57 +0100 |
commit | 1c4f4c2494a97d0088e48405c1f8f4f48846f180 (patch) | |
tree | f0736aea413941836f01b4dbe52942031ecfa870 /libmproxy/protocol | |
parent | b1311faa68947b982dbbe8b8f3e9d26b2356b1c2 (diff) | |
download | mitmproxy-1c4f4c2494a97d0088e48405c1f8f4f48846f180.tar.gz mitmproxy-1c4f4c2494a97d0088e48405c1f8f4f48846f180.tar.bz2 mitmproxy-1c4f4c2494a97d0088e48405c1f8f4f48846f180.zip |
web: duplicate, delete, replay flows
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r-- | libmproxy/protocol/primitives.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |