Skip to content

Commit 9a4f343

Browse files
Further refining the definition of the mode and adding an assertion
1 parent fbf459d commit 9a4f343

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

fetch.bs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ urlPrefix:https://w3c.github.io/hr-time/#;spec:hr-time
3535
type:typedef;url:dom-domhighrestimestamp;text:DOMHighResTimeStamp
3636

3737
urlPrefix:https://tc39.es/ecma262/#;type:dfn;spec:ecma-262
38-
url:sec-agent-clusters;text:agent cluster
39-
url:host-environment;text:host environment
4038
url:realm;text:realm
4139
url:sec-list-and-record-specification-type;text:Record
4240
</pre>
@@ -1804,17 +1802,18 @@ Unless stated otherwise, it is "<code>no-cors</code>".
18041802

18051803
<dt>"<code>unsafe-no-cors</code>"
18061804
<dd>This is a special mode for the [=user agent=] to use internally to wittingly make
1807-
requests that are unsafe. It restricts requests to using <a>CORS-safelisted methods</a> and
1808-
<a>CORS-safelisted request-headers</a> and a request with this mode cannot use
1805+
requests that are unsafe. It restricts a <a for=/>request</a> to using <a>CORS-safelisted methods</a>,
1806+
<a>CORS-safelisted request-headers</a>, and the <a for=/>request</a> must have a <a>parallel queue</a>
1807+
<a for="fetch params">task destination</a>. A <a for=/>request</a> with this mode cannot use
18091808
<a>service-workers mode</a> "<code>all</code>". However, the request will not be required to
18101809
pass a <a>cross-origin resource policy check</a> or to test if
18111810
<a>Cross-Origin-Embedder-Policy allows credentials</a>. Upon success a fetch will
18121811
return a <a>cors filtered response</a>.
18131812

18141813
<p class=warning> Using <a for=/>request</a> <a for=request>mode</a> "<code>unsafe-no-cors</code>"
1815-
is even more discouraged and unsafe than "<code>no-cors</code>". Any use of this mode must be in an
1816-
<a>agent cluster</a> associated with the <a>host environment</a> itself to isolate its results from
1817-
misuse. This <a for=request>mode</a> is deliberately not exposed in the {{RequestMode}}.
1814+
is even more discouraged and unsafe than "<code>no-cors</code>". Any use of this mode must be
1815+
memory-isolated to the [=user agent=] to contain its results and prevent their disclosure or misuse.
1816+
This <a for=request>mode</a> is deliberately not exposed in the {{RequestMode}}.
18181817

18191818
<dt>"<code>websocket</code>"
18201819
<dd>This is a special mode used only when
@@ -4003,6 +4002,10 @@ the request.
40034002
<p><a for=/>Assert</a>: <var>request</var>'s <a for=request>mode</a> is "<code>navigate</code>" or
40044003
<var>processEarlyHintsResponse</var> is null.
40054004

4005+
<p>If <var>fetchParams</var>'s <a for="fetch params">request</a>'s <a for=request>mode</a> is
4006+
"<code>unsafe-no-cors</code>": <a for=/>assert</a>: <var>fetchParams</var>'s
4007+
<a for="fetch params">task destination</a> is a <a for=/>parallel queue</a>.
4008+
40064009
<p class=note>Processing of early hints (<a for=/>responses</a> whose <a for=response>status</a>
40074010
is 103) is only vetted for navigations.
40084011

0 commit comments

Comments
 (0)