Re: [w3c/ServiceWorker] Abstracting cache matching (#1341)

jungkees commented on this pull request.



> -      1. For each |cachedResponse| in |responses|:
-          1. Let |cachedRequest| be |requests|[|index|].
-          1. Increment |index| by one.
-          1. If |cachedResponse|'s [=response/header list=] contains no <a>header</a> [=header/named=] \`<code>Vary</code>\`, or |options|.{{CacheQueryOptions/ignoreVary}} is true, then:
-              1. [=list/Append=] |cachedRequest|/|cachedResponse| to |resultList|.
-              1. [=Continue=].
-          1. Let |fieldValues| be the [=list=] containing the elements corresponding to the [=http/field-values=] of the <a>Vary</a> header.
-          1. Let |isMatched| be true.
-          1. For each |fieldValue| in |fieldValues|:
-              1. If |fieldValue| matches "`*`", or the [=combined value=] given |fieldValue| and |cachedRequest|'s [=request/header list=] does not match the [=combined value=] given |fieldValue| and |request|'s [=request/header list=], then:
-                  1. Set |isMatched| to false.
-                  1. [=Break=].
-          1. If |isMatched| is true, [=list/append=] |cachedRequest|/|cachedResponse| to |resultList|.
+          1. Let |cachedRequest| be |requestResponse|'s request.
+          1. Let |cachedResponse| be |requestResponse|'s response.
+          1. If [=Request Matches Cached Item=] with |requestQuery|, |cachedRequest|, |cachedResponse|, and |options| returns true, then add |cachedRequest|/|cachedResponse| to |resultList|.

It seems this step lost semantics of using the "copy" of the request and the "copy" of the response?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1341#pullrequestreview-153111193

Received on Thursday, 6 September 2018 20:40:34 UTC