aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/dump.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-02-16 22:37:04 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-02-16 22:37:04 +1300
commit8a9f20b78cf1ae51d4c10cd892500c252aef2ca3 (patch)
tree6e543c9d57ed75736a7e99bdd1245e317e0954d6 /libmproxy/dump.py
parent0dd1aa7cc7b15b3bedc3dc4da2fc15d5b726c10a (diff)
downloadmitmproxy-8a9f20b78cf1ae51d4c10cd892500c252aef2ca3.tar.gz
mitmproxy-8a9f20b78cf1ae51d4c10cd892500c252aef2ca3.tar.bz2
mitmproxy-8a9f20b78cf1ae51d4c10cd892500c252aef2ca3.zip
Don't leave dangling browser connections for pipelined requests.
Diffstat (limited to 'libmproxy/dump.py')
-rw-r--r--libmproxy/dump.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmproxy/dump.py b/libmproxy/dump.py
index 7eff4992..039fb9a7 100644
--- a/libmproxy/dump.py
+++ b/libmproxy/dump.py
@@ -20,6 +20,8 @@ class DumpMaster(flow.FlowMaster):
def handle_response(self, msg):
f = flow.FlowMaster.handle_response(self, msg)
+ if not f:
+ return
if 0 < self.verbosity < 3:
print >> self.outfile, ">>",
print >> self.outfile, msg.request.short()
@@ -41,6 +43,8 @@ class DumpMaster(flow.FlowMaster):
print >> self.outfile, "\t", i
print >> self.outfile, "<<"
msg.ack()
+ self.state.delete_flow(f)
+ print [i.get_state() for i in self.state.flow_list]
# begin nocover