Changed missing error for missing content length

From 400 to 411 (length required)
This commit is contained in:
Sebastian Lohff 2012-04-20 04:23:23 +02:00
parent 9ee544dece
commit 860e24906c
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ class FilePutter(BaseHTTPServer.BaseHTTPRequestHandler):
except (ValueError, KeyError): except (ValueError, KeyError):
pass pass
if length <= 0: if length <= 0:
self.sendResponse(400, "Content-Length was invalid or not set.") self.sendResponse(411, "Content-Length was invalid or not set.")
return -1 return -1
if length > self.maxUploadSize: if length > self.maxUploadSize:
self.sendResponse(413, "Your file was too big! Maximum allowed size is %d byte. <a href=\"/\">back</a>" % self.maxUploadSize) self.sendResponse(413, "Your file was too big! Maximum allowed size is %d byte. <a href=\"/\">back</a>" % self.maxUploadSize)