@@ -1666,17 +1666,38 @@ of the <a for="environment">target browsing context</a>'s <a>active document</a>
16661666<a>environment settings object</a> .
16671667
16681668<p> A <a for=/>request</a> has an associated
1669- <dfn export for=request id=concept-request-window>window</dfn>
1670- ("<code> no-window</code> ", "<code> client</code> ", or an
1671- <a>environment settings object</a> whose
1672- <a for="environment settings object">global object</a> is a
1673- {{Window}} object). Unless stated otherwise it is
1674- "<code> client</code> ".
1669+ <dfn export for=request id=concept-request-window>traversable for user prompts</dfn> , that is
1670+ "<code> no-traversable</code> ", "<code> client</code> ", or a <a for=/>traversable navigable</a> .
1671+ Unless stated otherwise it is "<code> client</code> ".
1672+
1673+ <div class=note>
1674+ <p> This is used to determine whether and where to show necessary UI for the request, such as
1675+ authentication prompts or client certificate dialogs.
1676+
1677+ <dl>
1678+ <dt> "<code> no-traversable</code> "
1679+ <dd> No UI is shown; usually the request fails with a <a>network error</a> .
1680+
1681+ <dt> "<code> client</code> "
1682+ <dd> This value will automatically be changed to either "<code> no-traversable</code> " or to a
1683+ <a for=/>traversable navigable</a> derived from the request's <a for=request>client</a> during
1684+ <a lt=fetch for=/>fetching</a> . This provides a convenient way for standards to not have to
1685+ explicitly set a request's <a for=request>traversable for user prompts</a> .
1686+
1687+ <dt> a <a for=/>traversable navigable</a>
1688+ <dd> The UI shown will be associated with the browser interface elements that are displaying that
1689+ <a for=/>traversable navigable</a> .
1690+ </dl>
1691+ </div>
16751692
1676- <p class=note> The "<code> client</code> " value is changed to "<code> no-window</code> " or
1677- <a for=/>request</a> 's <a for=request>client</a> during <a lt=fetch for=/>fetching</a> . It provides
1678- a convenient way for standards to not have to explicitly set <a for=/>request</a> 's
1679- <a for=request>window</a> .
1693+ <p> When displaying a user interface associated with a request in that request's
1694+ <a for=request>traversable for user prompts</a> , the user agent should update the address bar to
1695+ display something derived from the request's <a for=request>current URL</a> (and not, e.g., leave
1696+ it at its previous value, derived from the URL of the request's initiator). Additionally, the user
1697+ agent should avoid displaying content from the request's initiator in the
1698+ <a for=request>traversable for user prompts</a> , especially in the case of cross-origin requests.
1699+ Displaying a blank page behind such prompts is a good way to fulfill these requirements. Failing to
1700+ follow these guidelines can confuse users as to which origin is responsible for the prompt.
16801701
16811702<p id=keep-alive-flag> A <a for=/>request</a> has an associated boolean
16821703<dfn for=request export id=request-keepalive-flag>keepalive</dfn> . Unless stated otherwise it is
@@ -4334,7 +4355,9 @@ the response. [[!HTTP-CACHING]]
43344355 <li><p><var> request</var> 's <a for=request>mode</a> is "<code> same-origin</code> ",
43354356 "<code> cors</code> ", or "<code> no-cors</code> "
43364357
4337- <li><p><var> request</var> 's <a for=request>window</a> is an <a>environment settings object</a>
4358+ <li><p><var> request</var> 's <a for=request>client</a> is not null, and <var>request</var>' s
4359+ <a for=request>client</a> 's <a for="environment settings object">global object</a> is a
4360+ {{Window}} object
43384361
43394362 <li><p><var> request</var> 's <a for=request>method</a> is `<code> GET</code> `
43404363
@@ -4354,7 +4377,7 @@ the response. [[!HTTP-CACHING]]
43544377 <a for="fetch params">preloaded response candidate</a> to <var> response</var> .
43554378
43564379 <li><p> Let <var> foundPreloadedResource</var> be the result of invoking
4357- <a>consume a preloaded resource</a> for <var> request</var> 's <a for=request>window </a> , given
4380+ <a>consume a preloaded resource</a> for <var> request</var> 's <a for=request>client </a> , given
43584381 <var> request</var> 's <a for=request>URL</a>, <var>request</var>' s <a for=request>destination</a> ,
43594382 <var> request</var> 's <a for=request>mode</a>, <var>request</var>' s
43604383 <a for=request>credentials mode</a> , <var> request</var> 's <a for=request>integrity metadata</a> ,
@@ -4439,15 +4462,36 @@ the response. [[!HTTP-CACHING]]
44394462<p> To <dfn>populate request from client</dfn> given a <a for=/>request</a> <var> request</var> :
44404463
44414464<ol>
4442- <li><p> If <var> request</var> 's <a for=request>window</a> is "<code> client</code> ", then: set
4443- <var> request</var> 's <a for=request>window</a> to <var>request</var>' s <a for=request>client</a>
4444- if <var> request</var> 's <a for=request>client</a>' s
4445- <a for="environment settings object">global object</a> is a {{Window}} object; otherwise
4446- "<code> no-window</code> ".
4447-
4448- <li><p> If <var> request</var> 's <a for=request>origin</a> is "<code> client</code> ", then set
4449- <var> request</var> 's <a for=request>origin</a> to <var>request</var>' s <a for=request>client</a> 's
4450- <a for="environment settings object">origin</a> .
4465+ <li>
4466+ <p> If <var> request</var> 's <a for=request>traversable for user prompts</a> is "<code> client</code> ":
4467+
4468+ <ol>
4469+ <li><p> Set <var> request</var> 's <a for=request>traversable for user prompts</a> to
4470+ "<code> no-traversable</code> ".
4471+
4472+ <li>
4473+ <p> If <var> request</var> 's <a for=request>client</a> is non-null:
4474+
4475+ <ol>
4476+ <li><p> Let <var> global</var> be <var> request</var> 's <a for=request>client</a>' s
4477+ <a for="environment settings object">global object</a> .
4478+
4479+ <li><p> If <var> global</var> is a {{Window}} object and <var> global</var> 's
4480+ <a for=Window>navigable</a> is not null, then set <var> request</var> 's
4481+ <a for=request>traversable for user prompts</a> to <var> global</var> 's
4482+ <a for=Window>navigable</a> 's <a for=navigable>traversable navigable</a> .
4483+ </ol>
4484+ </ol>
4485+
4486+ <li>
4487+ <p> If <var> request</var> 's <a for=request>origin</a> is "<code> client</code> ":
4488+
4489+ <ol>
4490+ <li><p> <a>Assert</a> : <var> request</var> 's <a for=request>client</a> is non-null.
4491+
4492+ <li><p> Set <var> request</var> 's <a for=request>origin</a> to <var>request</var>' s
4493+ <a for=request>client</a> 's <a for="environment settings object">origin</a> .
4494+ </ol>
44514495
44524496 <li>
44534497 <p> If <var> request</var> 's <a for=request>policy container</a> is "<code> client</code> ":
@@ -5517,10 +5561,11 @@ run these steps:
55175561 <a for="fetch params">canceled</a> :
55185562
55195563 <ol>
5520- <li><p> If <var> request</var> 's <a for=request>window</a> is "<code> no-window</code> " and
5521- <var> request</var> 's <a for=request>redirect mode</a> is "<code> error</code> ", then set
5522- <var> httpFetchParams</var> to <var> fetchParams</var> and <var> httpRequest</var> to
5523- <var> request</var> .
5564+ <li>
5565+ <p> If <var> request</var> 's <a for=request>traversable for user prompts</a> is
5566+ "<code> no-traversable</code> " and <var> request</var> 's <a for=request>redirect mode</a> is
5567+ "<code> error</code> ", then set <var> httpFetchParams</var> to <var> fetchParams</var> and
5568+ <var> httpRequest</var> to <var> request</var> .
55245569
55255570 <li>
55265571 <p> Otherwise:
@@ -5541,6 +5586,12 @@ run these steps:
55415586 <var> httpRequest</var> .
55425587 </ol>
55435588
5589+ <p class=note> If user prompts or redirects are possible, then the user agent might need to
5590+ re-send the request with a new set of headers after the user answers the prompt or the redirect
5591+ location is determined. At that time, the original request body might have been partially sent
5592+ already, so we need to clone the request (including the body) beforehand so that we have a
5593+ spare copy available.
5594+
55445595 <li>
55455596 <p> Let <var> includeCredentials</var> be true if one of
55465597
@@ -5919,8 +5970,8 @@ run these steps:
59195970 <li>
59205971 <p> If <var> response</var> 's <a for=response>status</a> is 401, <var>httpRequest</var>' s
59215972 <a for=request>response tainting</a> is not "<code> cors</code> ", <var> includeCredentials</var> is
5922- true, and <var> request</var> 's <a for=request>window</a> is an <a>environment settings object</a> ,
5923- then :
5973+ true, and <var> request</var> 's <a for=request>traversable for user prompts</a> is a
5974+ <a for=/>traversable navigable</a> :
59245975
59255976 <ol>
59265977 <li class=XXX><p> Needs testing: multiple `<code> WWW-Authenticate</code> ` headers, missing,
@@ -5948,7 +5999,7 @@ run these steps:
59485999
59496000 <li><p> Let <var> username</var> and <var> password</var> be the result of prompting the end user
59506001 for a username and password, respectively, in <var> request</var> 's
5951- <a for=request>window </a> .
6002+ <a for=request>traversable for user prompts </a> .
59526003
59536004 <li><p> <a>Set the username</a> given <var> request</var> 's <a for=request>current URL</a> and
59546005 <var> username</var> .
@@ -5965,8 +6016,8 @@ run these steps:
59656016 <p> If <var> response</var> 's <a for=response>status</a> is 407, then:
59666017
59676018 <ol>
5968- <li><p> If <var> request</var> 's <a for=request>window </a> is
5969- "<code> no-window </code> ", then return a <a>network error</a> .
6019+ <li><p> If <var> request</var> 's <a for=request>traversable for user prompts </a> is
6020+ "<code> no-traversable </code> ", then return a <a>network error</a> .
59706021
59716022 <li class=XXX><p> Needs testing: multiple `<code> Proxy-Authenticate</code> ` headers, missing,
59726023 parsing issues.
@@ -5976,7 +6027,7 @@ run these steps:
59766027
59776028 <li>
59786029 <p> Prompt the end user as appropriate in <var> request</var> 's
5979- <a for=request>window </a> and store the result as a
6030+ <a for=request>traversable for user prompts </a> and store the result as a
59806031 <a>proxy-authentication entry</a> . [[!HTTP]]
59816032
59826033 <p class=note> Remaining details surrounding proxy authentication are defined by HTTP.
@@ -6156,10 +6207,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
61566207 <p> If the HTTP request results in a TLS client certificate dialog, then:
61576208
61586209 <ol>
6159- <li><p> If <var> request</var> 's <a for=request>window</a>
6160- is an <a>environment settings object</a> , make the dialog
6161- available in <var> request</var> 's
6162- <a for=request>window</a> .
6210+ <li><p> If <var> request</var> 's <a for=request>traversable for user prompts</a> is a
6211+ <a for=/>traversable navigable</a> , then make the dialog available in <var> request</var> 's
6212+ <a for=request>traversable for user prompts</a> .
61636213
61646214 <li><p> Otherwise, return a <a>network error</a> .
61656215 </ol>
@@ -7741,19 +7791,19 @@ constructor steps are:
77417791 <li><p> Let <var> origin</var> be <a>this</a> 's <a>relevant settings object</a>' s
77427792 <a for="environment settings object">origin</a> .
77437793
7744- <li><p> Let <var> window </var> be "<code> client</code> ".
7794+ <li><p> Let <var> traversableForUserPrompts </var> be "<code> client</code> ".
77457795
7746- <li><p> If <var> request</var> 's <a for=request>window </a> is
7747- an <a>environment settings object</a> and its
7796+ <li><p> If <var> request</var> 's <a for=request>traversable for user prompts </a>
7797+ is an <a>environment settings object</a> and its
77487798 <a for="environment settings object">origin</a> is <a>same origin</a> with
7749- <var> origin</var> , then set <var> window </var> to <var> request </var> 's
7750- <a for=request>window </a> .
7799+ <var> origin</var> , then set <var> traversableForUserPrompts </var> to
7800+ <var> request </var> 's < a for=request>traversable for user prompts </a> .
77517801
77527802 <li><p> If <var> init</var> ["{{RequestInit/window}}"] <a for=map>exists</a> and is non-null, then
77537803 <a>throw</a> a {{TypeError}} .
77547804
77557805 <li><p> If <var> init</var> ["{{RequestInit/window}}"] <a for=map>exists</a> , then set
7756- <var> window </var> to "<code> no-window </code> ".
7806+ <var> traversableForUserPrompts </var> to "<code> no-traversable </code> ".
77577807
77587808 <li>
77597809 <p> Set <var> request</var> to a new <a for=/>request</a> with the following properties:
@@ -7774,8 +7824,8 @@ constructor steps are:
77747824 <dt> <a for=request>client</a>
77757825 <dd> <a>This</a> 's <a>relevant settings object</a> .
77767826
7777- <dt> <a for=request>window </a>
7778- <dd><var> window </var> .
7827+ <dt> <a for=request>traversable for user prompts </a>
7828+ <dd><var> traversableForUserPrompts </var> .
77797829
77807830 <dt> <a for=request>internal priority</a>
77817831 <dd><var> request</var> 's <a for=request>internal priority</a> .
0 commit comments