Respond with 411 Length Required when missing

This commit is contained in:
Gregers Gram Rygg 2017-11-22 11:53:30 +01:00 committed by Gina Häußge
parent f3080daa47
commit b002e41a00

View file

@ -207,7 +207,7 @@ class UploadStorageFallbackHandler(RequestlessExceptionLoggingMixin):
if self.is_multipart():
if not self._bytes_left:
# we don't support requests without a content-length
raise tornado.web.HTTPError(400, log_message="No Content-Length supplied")
raise tornado.web.HTTPError(411, log_message="No Content-Length supplied")
# extract the multipart boundary
fields = self._content_type.split(";")