mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
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:
parent
66349c9783
commit
f009770d4c
@ -454,9 +454,10 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
|
|||||||
|
|
||||||
def handle(self):
|
def handle(self):
|
||||||
cc = ClientConnection(self.client_address)
|
cc = ClientConnection(self.client_address)
|
||||||
cc.send(self.mqueue)
|
|
||||||
while not cc.close:
|
while not cc.close:
|
||||||
|
cc.send(self.mqueue)
|
||||||
self.handle_request(cc)
|
self.handle_request(cc)
|
||||||
|
cc = cc.copy()
|
||||||
self.finish()
|
self.finish()
|
||||||
|
|
||||||
def handle_request(self, cc):
|
def handle_request(self, cc):
|
||||||
|
Loading…
Reference in New Issue
Block a user