mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-07-16 07:35:27 +08:00
better etag matching
This commit is contained in:
parent
e9760f261e
commit
f74b29416a
@ -64,7 +64,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
|||||||
|
|
||||||
// set etag
|
// set etag
|
||||||
etag := filer.ETagEntry(entry)
|
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)
|
w.WriteHeader(http.StatusPreconditionFailed)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user