- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 03 Dec 2021 00:35:31 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1342/review/822372679@github.com>
@annevk commented on this pull request. Where does this end up invoking finalize response? > @@ -3811,6 +3814,54 @@ the request. <var>request</var>'s <a for=request>origin</a> to <var>request</var>'s <a for=request>client</a>'s <a for="environment settings object">origin</a>. + <li><p>Let <var>hasCustomHeaders</var> be false. + + <li><p><a for=list>For each</a> <var>header</var> in <var>request</var>'s + <a for=request>header list</a>, if <var>header</var>'s <a for=header>name</a> is + not `<code>If-Modified-Since</code>`, `<code>If-None-Match</code>`, `<code>If-Unmodified-Since</code>`, + `<code>If-Match</code>`, `<code>User-Agent</code>`, or `<code>Cache-Control</code>`, set + <var>hasCustomHeaders</var> to true. This would always end up with _hasCustomHeaders_ being true. > + <li><p>Let <var>hasCustomHeaders</var> be false. + + <li><p><a for=list>For each</a> <var>header</var> in <var>request</var>'s + <a for=request>header list</a>, if <var>header</var>'s <a for=header>name</a> is + not `<code>If-Modified-Since</code>`, `<code>If-None-Match</code>`, `<code>If-Unmodified-Since</code>`, + `<code>If-Match</code>`, `<code>User-Agent</code>`, or `<code>Cache-Control</code>`, set + <var>hasCustomHeaders</var> to true. + + <li> + <p>If all of the following conditions are true:</p> + + <ul class=brief> + <li><p><var>request</var>'s <a for=request>allow preloads</a> is true + + <li><p><var>request</var>'s <a for=request>origin</a> is <var>request</var>'s + <a for=request>client</a>'s <a for="environment settings object">origin</a> When would this not be true? > + <li><p><var>request</var>'s <a for=request>mode</a> is "<code>same-origin</code>", + "<code>cors</code>", or "<code>no-cors</code>" + + <li><p><var>hasCustomHeaders</var> is false + + <li><p><var>request</var>'s <a for=request>window</a> is not null + + <li><p><var>request</var>'s <a for=request>method</a> is `<code>GET</code>` + </ul> + + <p>then perform the following steps: + + <ol> + <li><p>Let <var>onPreloadedResponseAvailable</var> be to an algorithm that runs the following + step <a>in parallel</a> given <a for=/>response</a> <var>response</var>: + Run <a>fetch finale</a> given <var>response</var> and <var>fetchParams</var>. Wrapping needs to be adjusted here. Run should be lowercase. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/1342#pullrequestreview-822372679
Received on Friday, 3 December 2021 08:35:44 UTC