Browse Source

better etag matching

pull/2348/head
Chris Lu 3 years ago
parent
commit
f74b29416a
  1. 2
      weed/server/filer_server_handlers_read.go

2
weed/server/filer_server_handlers_read.go

@ -64,7 +64,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
// set etag
etag := filer.ETagEntry(entry)
if ifm := r.Header.Get("If-Match"); ifm != "" && ifm != "\""+etag+"\"" {
if ifm := r.Header.Get("If-Match"); ifm != "" && (ifm != "\""+etag+"\"" && ifm != etag){
w.WriteHeader(http.StatusPreconditionFailed)
return
}

Loading…
Cancel
Save