diff --git a/fetch.bs b/fetch.bs index 7872b8067..bf7f9b6eb 100755 --- a/fetch.bs +++ b/fetch.bs @@ -2307,10 +2307,15 @@ Unless stated otherwise, it is unset. timing allow failed flag. Unless stated otherwise, it is unset. +
A request has an associated
+navigation timing allow check set (an ordered set of zero
+or more strings). Unless stated otherwise, it is « "*" ».
+
A request's URL list, current URL, redirect count, response tainting, -done flag, and timing allow failed flag are used as -bookkeeping details by the fetch algorithm. +done flag, timing allow failed flag, and +navigation timing allow check set are used as bookkeeping details by the +fetch algorithm.
A request has an associated WebDriver id @@ -2608,6 +2613,14 @@ allowed on the resource fetched by looking at the flag of the response returned. the response of a redirect has to be set if it was set for previous responses in the redirect chain, this is also tracked internally using the request's timing allow failed flag. +
A response has an associated
+navigation timing allow check set (an ordered set of
+zero or more strings). Unless stated otherwise, it is « "*" ».
+
+
This is used by responses to navigation requests so that +callers can determine, once the navigation's destination origin is known, whether that origin is +allowed by every redirect in the redirect chain. +
A response has an associated body info (a response body info). Unless stated otherwise, it is a new @@ -5104,6 +5117,11 @@ steps:
Set internalResponse's redirect taint to request's redirect-taint. +
If request is a navigation request, then set + internalResponse's navigation timing allow check set to a + clone of request's + navigation timing allow check set. +
If request's timing allow failed flag is unset, then set internalResponse's timing allow passed flag. @@ -5884,6 +5902,10 @@ these steps:
If internalResponse's status is a redirect status:
If request is a navigation request, then + restrict a request's navigation timing allow check set given request and + internalResponse. +
If internalResponse's status is not 303, request's body is non-null, and the connection uses HTTP/2, then user agents @@ -7311,6 +7333,74 @@ agent's CORS-preflight cache for which there is a cache entry match +
To restrict a request's navigation timing allow check set, given a +request request and a response response, run these +steps: + +
Assert: request is a navigation request. + +
Let taoValues be the result of
+ getting, decoding, and splitting `Timing-Allow-Origin` from
+ response's header list.
+
+
If taoValues is null, then set taoValues to « ». + +
If taoValues contains "*", then return.
+
If the current response contains "*", it does not further restrict the chain. + +
Let currentSet be request's + navigation timing allow check set. + +
Let newSet be a new ordered set. + +
If currentSet contains "*", then:
+
+
If all previous responses in the chain contained "*", the current
+ response's values can be taken as is.
+
+
For each taoValue of taoValues, + append taoValue to newSet. + +
Set request's navigation timing allow check set to + newSet. + +
Return. +
For each allowedOrigin of currentSet: + +
+ +Set request's navigation timing allow check set to + newSet. +
To perform a navigation TAO check for a +response response and an origin +destinationOrigin, run these steps: + +
If response's navigation timing allow check set
+ contains "*", then return success.
+
+
If response's navigation timing allow check set + contains destinationOrigin, + serialized, then return success. + +
Return failure. +
Deferred fetching allows callers to request that a fetch is invoked at the latest possible