Unverified Commit a234c56b authored by Whyrusleeping's avatar Whyrusleeping Committed by GitHub

Merge pull request #3983 from ivan386/patch-3

check strong and weak ETag validator
parents e8cad124 0eafa5e2
......@@ -198,7 +198,7 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
// Check etag send back to us
etag := "\"" + resolvedPath.Cid().String() + "\""
if r.Header.Get("If-None-Match") == etag {
if r.Header.Get("If-None-Match") == etag || r.Header.Get("If-None-Match") == "W/"+etag {
w.WriteHeader(http.StatusNotModified)
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment