From f009770d4ca441d151b6b96c2f1142eeb8b18aba Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 16 Feb 2011 19:22:19 +1300 Subject: Fix a bug in HTTP 1.1 pipelining that caused Requests to be over-written. We use the ClientConnection object to tie requests, responses and errors together. This is an HTTP 1.0 assumption, but we can fix it by just making copies of the connection object when we handle multiple requests. --- libmproxy/proxy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmproxy/proxy.py') diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index e2c25966..ff0d9a96 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -454,9 +454,10 @@ 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() def handle_request(self, cc): -- cgit v1.2.3