Replace 500 with 404 and Don't return body for HEAD request
This commit is contained in:
parent
35811f77b4
commit
28d0e25dbf
|
@ -167,7 +167,8 @@ func (h *Handler) patchFile(w http.ResponseWriter, r *http.Request, id string) {
|
|||
func (h *Handler) headFile(w http.ResponseWriter, r *http.Request, id string) {
|
||||
info, err := h.store.GetInfo(id)
|
||||
if err != nil {
|
||||
h.err(err, w, http.StatusInternalServerError)
|
||||
w.Header().Set("Content-Length", "0")
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue