Oops, use Error() func instead of direct call of ErrorXXX().
This commit is contained in:
parent
266cf9dbb0
commit
df3c5e0678
@ -79,11 +79,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if leftSpace < fHandler.Size {
|
||||
log.Println("not enough space left in storage, only", leftSpace>>20, "MiB left")
|
||||
if strings.Contains(r.UserAgent(), "curl") || strings.Contains(r.UserAgent(), "Wget") {
|
||||
http.Error(w, "Not enough space left, sorry", http.StatusInternalServerError)
|
||||
} else {
|
||||
web.ErrorXXX(utils.MainSite(r.Host), http.StatusInternalServerError, "Not enough space left, sorry.", w)
|
||||
}
|
||||
Error(w, r, http.StatusInternalServerError, "Not enough space left, sorry.")
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user