Skip to content

Commit

Permalink
Editorial: share a conditional in fetch response handover
Browse files Browse the repository at this point in the history
Also clean up an earlier internalResponse initialization.
  • Loading branch information
annevk committed May 8, 2023
1 parent 5629d15 commit aaada1f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4591,8 +4591,8 @@ steps:
</ol>

<li><p>Let <var>internalResponse</var> be <var>response</var>, if <var>response</var> is a
<a>network error</a>, and <var>response</var>'s <a for="filtered response">internal response</a>
otherwise.
<a>network error</a>; otherwise <var>response</var>'s
<a for="filtered response">internal response</a>.

<li>
<p>If <var>internalResponse</var>'s <a for=response>URL list</a> <a for=list>is empty</a>, then
Expand Down Expand Up @@ -4752,17 +4752,16 @@ steps:

<p class=note>This covers the case of <var>response</var> being a <a>network error</a>.

<li><p>Let <var>responseStatus</var> be 0 if <var>fetchParams</var>'s
<a for="fetch params">request</a>'s <a for=request>mode</a> is "<code>navigate</code>" and
<var>response</var>'s <a for=response>has-cross-origin-redirects</a> is true; otherwise
<var>response</var>'s <a for=response>status</a>.
<li><p>Let <var>responseStatus</var> be 0.

<li>
<p>If <var>fetchParams</var>'s <a for="fetch params">request</a>'s <a for=request>mode</a> is
not "<code>navigate</code>" or <var>response</var>'s
<a for=response>has-cross-origin-redirects</a> is false:

<ol>
<li><p>Set <var>responseStatus</var> to <var>response</var>'s <a for=response>status</a>.

<li><p>Let <var>mimeType</var> be the result of
<a for="header list">extracting a MIME type</a> from <var>response</var>'s
<a for=response>header list</a>.
Expand Down

0 comments on commit aaada1f

Please sign in to comment.