aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/flow.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-02-21 11:08:35 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-02-21 11:08:35 +1300
commitfe99871df873f755ef5f4770edf37304f88102d7 (patch)
tree81cac2d8573f4e48d08284baadff8e0440e58ac0 /libmproxy/flow.py
parentc3e38970718aed37dd70e8aad0085957b62a09ac (diff)
downloadmitmproxy-fe99871df873f755ef5f4770edf37304f88102d7.tar.gz
mitmproxy-fe99871df873f755ef5f4770edf37304f88102d7.tar.bz2
mitmproxy-fe99871df873f755ef5f4770edf37304f88102d7.zip
Add --kill option to mitmdump
If this option is passed all requests that are not part of a replayed conversation are killed. If the option is not passed, such requests are passed through to the server as usual.
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r--libmproxy/flow.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index 4025a30d..996b45cd 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -44,9 +44,10 @@ class ServerPlaybackState:
chronological order.
"""
for i in flows:
- h = self._hash(i)
- l = self.fmap.setdefault(self._hash(i), [])
- l.append(i)
+ if i.response:
+ h = self._hash(i)
+ l = self.fmap.setdefault(self._hash(i), [])
+ l.append(i)
def _hash(self, flow):
"""