diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-10 10:32:08 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-10 10:32:08 +0200 |
commit | 3b6140dfffe5abe5bd3ce48a9371620cbd7ef78a (patch) | |
tree | 3f0ec9543ba565cd168536c06a41de4878457039 /libmproxy/protocol/http.py | |
parent | c573d8c2920b87fe058db9263069f5d89feabd78 (diff) | |
download | mitmproxy-3b6140dfffe5abe5bd3ce48a9371620cbd7ef78a.tar.gz mitmproxy-3b6140dfffe5abe5bd3ce48a9371620cbd7ef78a.tar.bz2 mitmproxy-3b6140dfffe5abe5bd3ce48a9371620cbd7ef78a.zip |
fix send_response if content is missing
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r-- | libmproxy/protocol/http.py | 2 |
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) |