Send correct status on 404 in handleHTTPError

This commit is contained in:
Matt Baer 2019-01-03 12:27:52 -05:00
parent 8a07c0f0a0
commit 19215b0355

View file

@ -538,6 +538,7 @@ func (h *Handler) handleHTTPError(w http.ResponseWriter, r *http.Request, err er
h.errors.Gone.ExecuteTemplate(w, "base", p)
return
} else if err.Status == http.StatusNotFound {
w.WriteHeader(err.Status)
h.errors.NotFound.ExecuteTemplate(w, "base", pageForReq(h.app, r))
return
} else if err.Status == http.StatusInternalServerError {