Browse Source

weed filer: http HEAD response header add ETag

fix https://github.com/chrislusf/seaweedfs/issues/892
pull/902/head
Chris Lu 6 years ago
parent
commit
977b30e992
  1. 1
      weed/server/filer_server_handlers_read.go

1
weed/server/filer_server_handlers_read.go

@ -52,6 +52,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
if r.Method == "HEAD" {
w.Header().Set("Content-Length", strconv.FormatInt(int64(filer2.TotalSize(entry.Chunks)), 10))
w.Header().Set("Last-Modified", entry.Attr.Mtime.Format(http.TimeFormat))
setEtag(w, filer2.ETag(entry.Chunks))
return
}

Loading…
Cancel
Save