forked from seba/servefile
Changed missing error for missing content length
From 400 to 411 (length required)
This commit is contained in:
parent
9ee544dece
commit
860e24906c
|
@ -223,7 +223,7 @@ class FilePutter(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
except (ValueError, KeyError):
|
||||
pass
|
||||
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
|
||||
if length > self.maxUploadSize:
|
||||
self.sendResponse(413, "Your file was too big! Maximum allowed size is %d byte. <a href=\"/\">back</a>" % self.maxUploadSize)
|
||||
|
|
Loading…
Reference in New Issue