Skip to content

Commit 28fe3db

Browse files
cchangwendelvh
andauthored
1 parent 2a50d78 commit 28fe3db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/httpcache/httpcache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func checkIfNoneMatchIsValid(req *http.Request, etag string) bool {
5959
ifNoneMatch := req.Header.Get("If-None-Match")
6060
if len(ifNoneMatch) > 0 {
6161
for _, item := range strings.Split(ifNoneMatch, ",") {
62-
item = strings.TrimSpace(item)
62+
item = strings.TrimPrefix(strings.TrimSpace(item), "W/") // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag#directives
6363
if item == etag {
6464
return true
6565
}

0 commit comments

Comments
 (0)