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.
This commit is contained in:
Aldo Cortesi 2011-02-16 19:22:19 +13:00
parent 66349c9783
commit f009770d4c

View File

@ -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):