Merge pull request #19 from vayam/master

Replace 500 with 404 and Don't return body for HEAD request
This commit is contained in:
Felix Geisendörfer 2014-01-23 23:18:30 -08:00
commit 3db2976bd5
1 changed files with 2 additions and 1 deletions

View File

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