diff --git a/fetch.bs b/fetch.bs index adee889ba..365ab9910 100644 --- a/fetch.bs +++ b/fetch.bs @@ -1666,17 +1666,38 @@ of the target browsing context's active document environment settings object.
A request has an associated
-window
-("no-window
", "client
", or an
-environment settings object whose
-global object is a
-{{Window}} object). Unless stated otherwise it is
-"client
".
+traversable for user prompts, that is
+"no-traversable
", "client
", or a traversable navigable.
+Unless stated otherwise it is "client
".
+
+
This is used to determine whether and where to show necessary UI for the request, such as + authentication prompts or client certificate dialogs. + +
no-traversable
"
+ client
"
+ no-traversable
" or to a
+ traversable navigable derived from the request's client during
+ fetching. This provides a convenient way for standards to not have to
+ explicitly set a request's traversable for user prompts.
+
+ The "client
" value is changed to "no-window
" or
-request's client during fetching. It provides
-a convenient way for standards to not have to explicitly set request's
-window.
+
When displaying a user interface associated with a request in that request's +traversable for user prompts, the user agent should update the address bar to +display something derived from the request's current URL (and not, e.g., leave +it at its previous value, derived from the URL of the request's initiator). Additionally, the user +agent should avoid displaying content from the request's initiator in the +traversable for user prompts, especially in the case of cross-origin requests. +Displaying a blank page behind such prompts is a good way to fulfill these requirements. Failing to +follow these guidelines can confuse users as to which origin is responsible for the prompt.
A request has an associated boolean keepalive. Unless stated otherwise it is @@ -4334,7 +4355,9 @@ the response. [[!HTTP-CACHING]]
request's mode is "same-origin
",
"cors
", or "no-cors
"
-
request's window is an environment settings object +
request's client is not null, and request's + client's global object is a + {{Window}} object
request's method is `GET
`
@@ -4354,7 +4377,7 @@ the response. [[!HTTP-CACHING]]
preloaded response candidate to response.
Let foundPreloadedResource be the result of invoking - consume a preloaded resource for request's window, given + consume a preloaded resource for request's client, given request's URL, request's destination, request's mode, request's credentials mode, request's integrity metadata, @@ -4439,15 +4462,36 @@ the response. [[!HTTP-CACHING]]
To populate request from client given a request request:
If request's window is "client
", then: set
- request's window to request's client
- if request's client's
- global object is a {{Window}} object; otherwise
- "no-window
".
-
-
If request's origin is "client
", then set
- request's origin to request's client's
- origin.
+
If request's traversable for user prompts is "client
":
+
+
Set request's traversable for user prompts to
+ "no-traversable
".
+
+
If request's client is non-null: + +
Let global be request's client's + global object. + +
If global is a {{Window}} object and global's + navigable is not null, then set request's + traversable for user prompts to global's + navigable's traversable navigable. +
If request's origin is "client
":
+
+
If request's policy container is "client
":
@@ -5517,10 +5561,11 @@ run these steps:
canceled:
If request's window is "no-window
" and
- request's redirect mode is "error
", then set
- httpFetchParams to fetchParams and httpRequest to
- request.
+
If request's traversable for user prompts is
+ "no-traversable
" and request's redirect mode is
+ "error
", then set httpFetchParams to fetchParams and
+ httpRequest to request.
Otherwise: @@ -5541,6 +5586,12 @@ run these steps: httpRequest.
If user prompts or redirects are possible, then the user agent might need to + re-send the request with a new set of headers after the user answers the prompt or the redirect + location is determined. At that time, the original request body might have been partially sent + already, so we need to clone the request (including the body) beforehand so that we have a + spare copy available. +
Let includeCredentials be true if one of @@ -5919,8 +5970,8 @@ run these steps:
If response's status is 401, httpRequest's
response tainting is not "cors
", includeCredentials is
- true, and request's window is an environment settings object,
- then:
+ true, and request's traversable for user prompts is a
+ traversable navigable:
Needs testing: multiple `WWW-Authenticate
` headers, missing,
@@ -5948,7 +5999,7 @@ run these steps:
Let username and password be the result of prompting the end user for a username and password, respectively, in request's - window. + traversable for user prompts.
Set the username given request's current URL and username. @@ -5965,8 +6016,8 @@ run these steps:
If response's status is 407, then:
If request's window is
- "no-window
", then return a network error.
+
If request's traversable for user prompts is
+ "no-traversable
", then return a network error.
Needs testing: multiple `Proxy-Authenticate
` headers, missing,
parsing issues.
@@ -5976,7 +6027,7 @@ run these steps:
Prompt the end user as appropriate in request's - window and store the result as a + traversable for user prompts and store the result as a proxy-authentication entry. [[!HTTP]]
Remaining details surrounding proxy authentication are defined by HTTP. @@ -6156,10 +6207,9 @@ optional boolean forceNewConnection (default false), run these steps:
If the HTTP request results in a TLS client certificate dialog, then:
If request's window - is an environment settings object, make the dialog - available in request's - window. +
If request's traversable for user prompts is a + traversable navigable, then make the dialog available in request's + traversable for user prompts.
Otherwise, return a network error.
Let origin be this's relevant settings object's origin. -
Let window be "client
".
+
Let traversableForUserPrompts be "client
".
-
If request's window is - an environment settings object and its +
If request's traversable for user prompts + is an environment settings object and its origin is same origin with - origin, then set window to request's - window. + origin, then set traversableForUserPrompts to + request's traversable for user prompts.
If init["{{RequestInit/window}}"] exists and is non-null, then throw a {{TypeError}}.
If init["{{RequestInit/window}}"] exists, then set
- window to "no-window
".
+ traversableForUserPrompts to "no-traversable
".
Set request to a new request with the following properties: @@ -7774,8 +7824,8 @@ constructor steps are: