aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.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/proxy.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/proxy.py')
-rw-r--r--libmproxy/proxy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index ff0d9a96..54ff2ec3 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -454,8 +454,8 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
def handle(self):
cc = ClientConnection(self.client_address)
+ cc.send(self.mqueue)
while not cc.close:
- cc.send(self.mqueue)
self.handle_request(cc)
cc = cc.copy()
self.finish()
@@ -471,6 +471,7 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
if request is None:
cc.close = True
return
+
if request.is_response():
response = request
request = False