Send correct status on 404 in handleHTTPError

pull/54/head
Matt Baer 6 years ago
parent 8a07c0f0a0
commit 19215b0355
  1. 1
      handle.go

@ -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 {

Loading…
Cancel
Save