Handle lack of file size

This commit is contained in:
Felix Geisendörfer 2013-03-17 16:29:01 +01:00
parent d4d698d6da
commit 04c108633a
1 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,11 @@ func createFile(w http.ResponseWriter, r *http.Request) {
return
}
if contentRange.Size == -1 {
reply(w, http.StatusBadRequest, "Content-Range must indicate total file size.")
return
}
if contentRange.End != -1 {
reply(w, http.StatusNotImplemented, "File data in initial request.")
return