Open annevk opened 3 years ago
I assume this is related:
In the spec algorithm for matching a cached item at https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm, it is stated that each Vary header key listed in the Response shall be used to match the requestObject header value with the request's respective header value.
However, for Cache.put(), https://w3c.github.io/ServiceWorker/#cache-put, the Vary header matching only checks for '*' and not any other header keys. This appears to lead to cache items for the same request url being overwritten by put(), although they should have been stored as separate cache keys based on the Vary header values.
This needs to be rewritten on top of https://fetch.spec.whatwg.org/#concept-header-list-get (or perhaps the algorithm below "get, decode, and split") as this sentence makes little sense.