mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-26 22:57:02 +08:00
Maybe it should work; https://github.com/mitmproxy/mitmproxy/issues/319
This commit is contained in:
@@ -1332,7 +1332,12 @@ class HTTPHandler(ProtocolHandler):
|
||||
# incrementally:
|
||||
h = flow.response._assemble_head(preserve_transfer_encoding=True)
|
||||
self.c.client_conn.send(h)
|
||||
for chunk in http.read_http_body_chunked(self.c.server_conn.rfile,
|
||||
for chunk in hasattr(flow.response.stream, "__call__") and \
|
||||
flow.response.stream(http.read_http_body_chunked(self.c.server_conn.rfile,
|
||||
flow.response.headers,
|
||||
self.c.config.body_size_limit, flow.request.method,
|
||||
flow.response.code, False, 4096)) or \
|
||||
http.read_http_body_chunked(self.c.server_conn.rfile,
|
||||
flow.response.headers,
|
||||
self.c.config.body_size_limit, flow.request.method,
|
||||
flow.response.code, False, 4096):
|
||||
|
||||
Reference in New Issue
Block a user