From 28d0e25dbfda9ef8c00d5714e7d2dec5771a54e5 Mon Sep 17 00:00:00 2001 From: Naren Venkataraman Date: Fri, 24 Jan 2014 01:00:50 -0500 Subject: [PATCH] Replace 500 with 404 and Don't return body for HEAD request --- src/http/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/http/handler.go b/src/http/handler.go index b7014f5..702f530 100644 --- a/src/http/handler.go +++ b/src/http/handler.go @@ -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 }