Skip to content

Commit

Permalink
Use "process the next manual redirect" in navigation
Browse files Browse the repository at this point in the history
This replaces our use "HTTP-redirect fetch", which was pretty broken. Follows whatwg/fetch#1469.

Co-authored-by: Domenic Denicola <[email protected]>
  • Loading branch information
noamr and domenic authored Oct 17, 2022
1 parent 37748b0 commit 2e8e916
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#concept-header-extract-mime-type">extract a MIME type</dfn></li>
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#legacy-extract-an-encoding">legacy extract an encoding</dfn></li>
<li><dfn data-x="concept-fetch" data-x-href="https://fetch.spec.whatwg.org/#concept-fetch">fetch</dfn></li>
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#concept-http-redirect-fetch">HTTP-redirect fetch</dfn></li>
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#ok-status">ok status</dfn></li>
<li><dfn data-x="navigation-request" data-x-href="https://fetch.spec.whatwg.org/#navigation-request">navigation request</dfn></li>
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#concept-network-error">network error</dfn></li>
Expand All @@ -2555,6 +2554,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x="concept-header-list-set" data-x-href="https://fetch.spec.whatwg.org/#concept-header-list-set">set</dfn></li>
<li><dfn data-x="concept-header-list-get-decode-split" data-x-href="https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split">get, decode, and split</dfn></li>
<li><dfn data-x="concept-fetch-terminate" data-x-href="https://fetch.spec.whatwg.org/#concept-fetch-terminate">terminate</dfn></li>
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#process-the-next-manual-redirect">process the next manual redirect</dfn></li>
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check">cross-origin resource policy check</dfn></li>
<li>the <dfn data-x-href="https://fetch.spec.whatwg.org/#requestcredentials"><code>RequestCredentials</code></dfn> enumeration</li>
<li>the <dfn data-x-href="https://fetch.spec.whatwg.org/#requestdestination"><code>RequestDestination</code></dfn> enumeration</li>
Expand Down Expand Up @@ -88912,6 +88912,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location

<li><p>Let <var>commitEarlyHints</var> be null.</p></li>

<li><p>Let <var>fetchController</var> be null.</p></li>

<li>
<p>While true:</p>

Expand Down Expand Up @@ -89004,17 +89006,17 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
<p>Otherwise:</p>

<ol>
<li><p>If <var>response</var> is null, <!--FETCH--><span
data-x="concept-fetch">fetch</span> <var>request</var>, with
<li><p>If <var>fetchController</var> is null, then set <var>fetchController</var> to the
result of <!--FETCH--><span data-x="concept-fetch">fetching</span> <var>request</var>, with
<i data-x="processEarlyHintsResponse">processEarlyHintsResponse</i> set to the following step
given a <span data-x="concept-response">response</span> <var>earlyResponse</var>: If
<var>commitEarlyHints</var> is null, then set <var>commitEarlyHints</var> to the result
of <span data-x="process early hint headers">processing early hint headers</span> given
<var>earlyResponse</var> and <var>request</var>'s
<span data-x="concept-request-reserved-client">reserved client</span>.</p></li>

<li><p>Otherwise, perform <span>HTTP-redirect fetch</span> using
<var>request</var> and <var>response</var>.</p></li>
<li><p>Otherwise, <span>process the next manual redirect</span> given
<var>fetchController</var>.</p></li>

<li><p>Wait for the <span data-x="concept-task">task</span> on the <span>networking task
source</span> to <span>process response</span> and set <var>response</var> to the
Expand Down

0 comments on commit 2e8e916

Please sign in to comment.