Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jan 30, 2021
1 parent 3a28eee commit 154ede8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1998,8 +1998,9 @@ not a <a>fresh response</a> or a <a>stale-while-revalidate response</a>.

<hr>

<p>To <dfn export id=concept-response-location-url>extract a location URL</dfn>, given a
<a for=/>response</a> <var>response</var>:
<p>The <dfn export for=response id=concept-response-location-url>location URL</dfn> algorithm of
given a <a for=/>response</a> <var>response</var> is the following steps. They return null, failure,
or a <a for=/>URL</a>.

<ol>
<li><p>If <var>response</var>'s <a for=response>status</a> is not a <a>redirect status</a>, then
Expand All @@ -2014,15 +2015,16 @@ not a <a>fresh response</a> or a <a>stale-while-revalidate response</a>.
of <a lt="url parser">parsing</a> <var>location</var> with <var>response</var>'s
<a for=response>URL</a>.

<p class=note>If <var>response</var> was constructed in a service worker <var>response</var>'s
<a for=response>URL</a> will be null, meaning that <var>location</var> will only parse
successfully if it is an <a>absolute-URL-with-fragment string</a>.
<p class=note>If <var>response</var> was constructed through the {{Response}} constructor,
<var>response</var>'s <a for=response>URL</a> will be null, meaning that <var>location</var> will
only parse successfully if it is an <a>absolute-URL-with-fragment string</a>.

<li><p>Return <var>location</var>.
</ol>

<p class="note no-backref"><a>Extract a location URL</a> is used for redirect handling in Fetch and
in HTML's navigate algorithm as it handles redirects manually. [[!HTML]]
<p class=note>The <a for=response>location URL</a> algorithm is exclusively used for redirect
handling in this standard and in <cite>HTML</cite>'s navigate algorithm which handles redirects
manually. [[!HTML]]


<h4 id=miscellaneous>Miscellaneous</h4>
Expand Down Expand Up @@ -4011,8 +4013,7 @@ optional <i>CORS-preflight flag</i>, run these steps:
<a>filtered response</a>, and <var>response</var>'s
<a for=internal>internal response</a> otherwise.

<li><p>Let <var>locationURL</var> be the result of <a>extracting a location URL</a> given
<var>actualResponse</var>.
<li><p>Let <var>locationURL</var> be <var>actualResponse</var>'s <a for=response>location URL</a>.

<li><p>If <var>locationURL</var> is null, then return <var>response</var>.

Expand Down

0 comments on commit 154ede8

Please sign in to comment.