fix send_response if content is missing

This commit is contained in:
Maximilian Hils 2015-09-10 10:32:08 +02:00
parent c573d8c292
commit 3b6140dfff
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ class _StreamingHttpLayer(_HttpLayer):
raise NotImplementedError() raise NotImplementedError()
def send_response(self, response): 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_headers(response)
self.send_response_body(response, response.body) self.send_response_body(response, response.body)