aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmproxy/protocol/http.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index a05f3597..212bec96 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -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)