Skip to content

Commit 7c30987

Browse files
authored
Pass response status to mark resource timing
Resource Timing PR: w3c/resource-timing#335. HTML PR: whatwg/html#8405. Follow-up to provide more clarity around filtered responses (which this relies on): #1509.
1 parent 4a7bf35 commit 7c30987

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

fetch.bs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,6 +2266,9 @@ this is also tracked internally using the request's <a for=request>timing allow
22662266
<dfn export for=response>service worker timing info</dfn> (null or a
22672267
<a for=/>service worker timing info</a>), which is initially null.
22682268

2269+
<p>A <a for=/>response</a> has an associated <dfn for=response>has-cross-origin-redirects</dfn>
2270+
(a boolean), which is initially false.
2271+
22692272
<hr>
22702273

22712274
<p>A <a for=/>response</a> whose
@@ -4330,6 +4333,9 @@ steps:
43304333
<!-- If you are ever tempted to move this around, carefully consider responses from about URLs,
43314334
blob URLs, service workers, HTTP cache, HTTP network, etc. -->
43324335

4336+
<li><p>If <var>request</var> has a <a for=request>redirect-tainted origin</a>, then set
4337+
<var>internalResponse</var>'s <a for=response>has-cross-origin-redirects</a> to true.
4338+
43334339
<li><p>If <var>request</var>'s <a for=request>timing allow failed flag</a> is unset, then set
43344340
<var>internalResponse</var>'s <a for=response>timing allow passed flag</a>.
43354341

@@ -4471,12 +4477,17 @@ steps:
44714477

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

4480+
<li><p>Let <var>responseStatus</var> be 0 if <var>fetchParams</var>'s
4481+
<a for="fetch params">request</a>'s <a for=request>mode</a> is "<code>navigate</code>" and
4482+
<var>response</var>'s <a for=response>has-cross-origin-redirects</a> is true; otherwise
4483+
<var>response</var>'s <a for=response>status</a>.
4484+
44744485
<li><p>If <var>fetchParams</var>'s <a for="fetch params">request</a>'s
44754486
<a for=request>initiator type</a> is not null, then
44764487
<a for=/>mark resource timing</a> given <var>timingInfo</var>, <var>request</var>'s
44774488
<a for=request>URL</a>, <a for="fetch params">request</a>'s
4478-
<a for=request>initiator type</a>, <var>global</var>, <var>cacheState</var>, and
4479-
<var>bodyInfo</var>.
4489+
<a for=request>initiator type</a>, <var>global</var>, <var>cacheState</var>,
4490+
<var>bodyInfo</var>, and <var>responseStatus</var>.
44804491
</ol>
44814492

44824493
<li>

0 commit comments

Comments
 (0)