Andrea Spacca
há 5 anos
committed by
GitHub
ascendente
cometimento
bce4eec32c
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados
ID da chave GPG: 4AEE18F83AFDEB23
1 ficheiros alterados com
6 adições e
0 eliminações
-
server/handlers.go
|
|
@@ -397,6 +397,12 @@ func (s *Server) putHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
contentLength = n |
|
|
|
} |
|
|
|
|
|
|
|
if contentLength == 0 { |
|
|
|
log.Print("Empty content-length") |
|
|
|
http.Error(w, errors.New("Could not uplpoad empty file").Error(), 400) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
contentType := r.Header.Get("Content-Type") |
|
|
|
|
|
|
|
if contentType == "" { |
|
|
|