mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-23 03:49:21 +08:00
fix send_response if content is missing
This commit is contained in:
@@ -59,6 +59,8 @@ class _StreamingHttpLayer(_HttpLayer):
|
||||
raise NotImplementedError()
|
||||
|
||||
def send_response(self, response):
|
||||
if response.body == CONTENT_MISSING:
|
||||
raise HttpError(502, "Cannot assemble flow with CONTENT_MISSING")
|
||||
self.send_response_headers(response)
|
||||
self.send_response_body(response, response.body)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user