Skip to content

Commit 287ef66

Browse files
committed
Move the opaque-response-safelist check invocation
(CORB as specified applied to service worker responses, but that seems wrong.)
1 parent e910423 commit 287ef66

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

fetch.bs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4366,14 +4366,8 @@ steps:
43664366

43674367
<li><p>Set <var>request</var>'s <a for=request>response tainting</a> to "<code>opaque</code>".
43684368

4369-
<li><p>Let <var>opaqueResponse</var> be the result of running <a>scheme fetch</a> given
4370-
<var>fetchParams</var>.
4369+
<li><p>Return the result of running <a>scheme fetch</a> given <var>fetchParams</var>.
43714370
<!-- file URLs end up here as they are not same-origin typically. -->
4372-
4373-
<li><p>If the <a>opaque-response-safelist check</a> given <var>request</var> and
4374-
<var>opaqueResponse</var> returns true, then return <var>opaqueResponse</var>.
4375-
4376-
<li><p>Return a <a>network error</a>.
43774371
</ol>
43784372

43794373
<dt><var>request</var>'s <a for=request>current URL</a>'s <a for=url>scheme</a> is not an
@@ -4947,19 +4941,23 @@ these steps:
49474941
<li><p>Set <var>response</var> and <var>actualResponse</var> to the result of running
49484942
<a>HTTP-network-or-cache fetch</a> given <var>fetchParams</var>.
49494943

4950-
<li>
4951-
<p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>cors</code>" and a
4952-
<a>CORS check</a> for <var>request</var> and <var>response</var> returns failure, then return a
4953-
<a>network error</a>.
4944+
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>opaque</code>",
4945+
<var>response</var>'s <a for=response>status</a> is not a <a>redirect status</a>, and the
4946+
<a>opaque-response-safelist check</a> given <var>request</var> and <var>response</var> returns
4947+
false, then return a <a>network error</a>.
49544948

4955-
<p class="note no-backref">As the <a>CORS check</a> is not to be applied to
4956-
<a for=/>responses</a> whose <a for=response>status</a> is 304 or 407, or <a for=/>responses</a>
4957-
from a service worker for that matter, it is applied here.
4949+
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>cors</code>" and
4950+
the <a>CORS check</a> for <var>request</var> and <var>response</var> returns failure, then return
4951+
a <a>network error</a>.
49584952

49594953
<li><p>If the <a>TAO check</a> for <var>request</var> and <var>response</var> returns failure,
49604954
then set <var>request</var>'s <a for=request>timing allow failed flag</a>.
49614955
</ol>
49624956

4957+
<p class=note>As the <a>opaque-response-safelist check</a>, <a>CORS check</a>, and
4958+
<a>TAO check</a> are not to be applied to <a for=/>responses</a> whose <a for=response>status</a>
4959+
is 304 or 407, or to <a for=/>responses</a> from a service worker, they are applied here.
4960+
49634961
<li>
49644962
<p>If either <var>request</var>'s <a for=request>response tainting</a> or <var>response</var>'s
49654963
<a for=response>type</a> is "<code>opaque</code>", and the

0 commit comments

Comments
 (0)