Skip to content

Commit

Permalink
Response status field behind CORS check
Browse files Browse the repository at this point in the history
  • Loading branch information
abinpaul1 committed Jul 29, 2022
1 parent bc3ff6f commit 284faf4
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ <h3>
readonly attribute unsigned long long transferSize;
readonly attribute unsigned long long encodedBodySize;
readonly attribute unsigned long long decodedBodySize;
readonly attribute unsigned short responseStatus;
[Default] object toJSON();
};
</pre>
Expand Down Expand Up @@ -409,6 +410,11 @@ <h3>
info=] <a data-dfn-for="PerformanceResourceTiming"><dfn>resource
info</dfn></a>.
</p>
<p>
A <a>PerformanceResourceTiming</a> has an associated
<a data-cite="FETCH#concept-status">status</a> <a data-dfn-for=
"PerformanceResourceTiming"><dfn>response status</dfn></a>.
</p>
<p>
The <a>PerformanceResourceTiming</a> interface participates in the
<a data-cite=
Expand Down Expand Up @@ -698,6 +704,11 @@ <h3>
</p>
</li>
</ol>
<p data-dfn-for="PerformanceResourceTiming">
The <dfn>responseStatus</dfn> getter steps are to return
<a data-for="PerformanceResourceTiming">response status </a>for
<a>this</a>.
</p>
<p class='note'>
A user agent implementing <a>PerformanceResourceTiming</a> would need
to include <code>"resource"</code> in
Expand Down Expand Up @@ -942,7 +953,10 @@ <h3>
{{PerformanceResourceTiming/encodedBodySize}}, and
{{PerformanceResourceTiming/decodedBodySize}}. Further, the
{{PerformanceResourceTiming/nextHopProtocol}} attribute will be set
to the empty string.
to the empty string. If the <a data-cite=
"FETCH#concept-cors-check"> CORS check</a> fails the following
attributes will be set to zero:
{{PerformanceResourceTiming/responseStatus}}.
</p>
<p>
Server-side applications may return the <a>Timing-Allow-Origin</a>
Expand Down Expand Up @@ -1062,17 +1076,18 @@ <h2>
To <dfn data-export="">mark resource timing</dfn> given a [=/fetch
timing info=] |timingInfo|, a DOMString |requestedURL|, a DOMString
|initiatorType| a <a>global object</a> |global|, a string
|cacheMode|, and a [=/response body info=] |bodyInfo|, perform the
following steps:
|cacheMode|, a [=/response body info=] |bodyInfo|, and a
<a data-cite="FETCH#concept-status">status</a> |responseStatus|,
perform the following steps:
</p>
<ol>
<li>Create a <a>PerformanceResourceTiming</a> object |entry| in
|global|'s [=global object/realm=].
</li>
<li>
<a>Setup the resource timing entry</a> for |entry|, given
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|, and
|bodyInfo|.
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|,
|bodyInfo| and |responseStatus|.
</li>
<li>
<a data-cite=
Expand All @@ -1089,8 +1104,9 @@ <h2>
To <dfn data-export="">setup the resource timing entry</dfn> for
<a>PerformanceResourceTiming</a> |entry| given DOMString
|initiatorType|, DOMString |requestedURL|, [=/fetch timing info=]
|timingInfo|, a DOMString |cacheMode|, and a [=response body info=]
|bodyInfo|, perform the following steps:
|timingInfo|, a DOMString |cacheMode|, a [=response body info=]
|bodyInfo|, and a <a data-cite="FETCH#concept-status">status</a>
|responseStatus|, perform the following steps:
</p>
<ol>
<li>Assert that |cacheMode| is the empty string,
Expand All @@ -1111,6 +1127,9 @@ <h2>
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">cache
mode</a> to |cacheMode|.
</li>
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">response
status</a> to |responseStatus|.
</li>
</ol>
<p>
To <dfn>convert fetch timestamp</dfn> given {{DOMHighResTimeStamp}}
Expand Down

0 comments on commit 284faf4

Please sign in to comment.