Skip to content

Commit

Permalink
Editorial: clarify response's URL list
Browse files Browse the repository at this point in the history
Mainly to give myself more confidence about whatwg/html#9695.
  • Loading branch information
annevk committed Sep 6, 2023
1 parent f64d43f commit 9ca4bda
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2321,8 +2321,7 @@ source of security bugs. Please seek security review for features that deal with
<li><p>Assert: <var>response</var>'s <a for=response>URL list</a> <a for=list>is not empty</a>.

<li>
<p>Let <var>url</var> be a copy of <var>response</var>'s <a for=response>URL list</a>'s first
element.
<p>Let <var>url</var> be a copy of <var>response</var>'s <a for=response>URL list</a>[0].

<p class="note">This is not <var>response</var>'s <a for=response>URL</a> in order to avoid
leaking information about redirect targets (see
Expand Down Expand Up @@ -2393,8 +2392,8 @@ end-user.
<dfn export for=response id=concept-response-url-list>URL list</dfn> (a <a for=/>list</a> of zero or
more <a for=/>URLs</a>). Unless stated otherwise, it is « ».

<p class=note>Except for the last <a for=/>URL</a>, if any, a <a for=/>response</a>'s
<a for=response>URL list</a> is not exposed to script as that would violate
<p class=note>Except for the first and last <a for=/>URL</a>, if any, a <a for=/>response</a>'s
<a for=response>URL list</a> is not directly exposed to script as that would violate
<a>atomic HTTP redirect handling</a>.

<p>A <a for=/>response</a> has an associated
Expand Down Expand Up @@ -4634,8 +4633,8 @@ steps:
<p>If <var>internalResponse</var>'s <a for=response>URL list</a> <a for=list>is empty</a>, then
set it to a <a for=list>clone</a> of <var>request</var>'s <a for=request>URL list</a>.

<p class=note>A <a for=/>response</a>'s <a for=response>URL list</a> can be empty (for example,
when the response represents an <code>about</code> URL).
<p class=note>A <a for=/>response</a>'s <a for=response>URL list</a> can be empty, e.g., when
fetching an <code>about:</code> URL.
<!-- If you are ever tempted to move this around, carefully consider responses from about URLs,
blob URLs, service workers, HTTP cache, HTTP network, etc. -->

Expand Down Expand Up @@ -8318,8 +8317,8 @@ otherwise <a>this</a>'s <a for=Response>response</a>'s <a for=response>URL</a>,
to true.

<p>The <dfn attribute for=Response><code>redirected</code></dfn> getter steps are to return true if
<a>this</a>'s <a for=Response>response</a>'s <a for=response>URL list</a> has more than one item;
otherwise false.
<a>this</a>'s <a for=Response>response</a>'s <a for=response>URL list</a>'s <a for=list>size</a> is
greater than 1; otherwise false.

<p class=note>To filter out <a for=/>responses</a> that are the result of a
redirect, do this directly through the API, e.g., <code>fetch(url, { redirect:"error" })</code>.
Expand Down

0 comments on commit 9ca4bda

Please sign in to comment.