From 3b6140dfffe5abe5bd3ce48a9371620cbd7ef78a Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 10 Sep 2015 10:32:08 +0200 Subject: fix send_response if content is missing --- libmproxy/protocol/http.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmproxy/protocol/http.py') 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) -- cgit v1.2.3