Skip to content

Commit 48fc0f9

Browse files
committed
Allow WebDriver BiDi to override the cache mode
The primary use case here is allowing WebDriver to enforce that requests do not use the network cache, including the CORS preflight cache. But for future extension the this works by calling into WebDriver BiDi to get a cache behavior for the request, which is then translated into specific implementation on the fetch side (e.g. setting the request's cache mode, or not using the preflight cache). For now the only possible values of the cache behavior are "default" and "bypass", so we only need to check for the latter value.
1 parent d41ef17 commit 48fc0f9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

fetch.bs

+8-2
Original file line numberDiff line numberDiff line change
@@ -5237,6 +5237,8 @@ these steps:
52375237
<li>There is at least one <a for=list>item</a> in the <a>CORS-unsafe request-header names</a>
52385238
with <var>request</var>'s <a for=request>header list</a> for which there is no
52395239
<a>header-name cache entry match</a> using <var>request</var>.
5240+
5241+
<li><p><a>WebDriver BiDi cache behavior</a> with <var>request</var> is "<code>bypass</code>".
52405242
</ul>
52415243

52425244
<p>Then:
@@ -5615,6 +5617,9 @@ run these steps:
56155617
<a>default `<code>User-Agent</code>` value</a>) to <var>httpRequest</var>'s
56165618
<a for=request>header list</a>.
56175619

5620+
<li><p>If <a>WebDriver BiDi cache behavior</a> with <var>request</var> is "<code>bypass</code>, then
5621+
set <var>httpRequest</var>'s <a for=request>cache mode</a> to "<code>no-store</code>".
5622+
56185623
<li><p>If <var>httpRequest</var>'s <a for=request>cache mode</a> is "<code>default</code>" and
56195624
<var>httpRequest</var>'s <a for=request>header list</a> <a for="header list">contains</a>
56205625
`<code>If-Modified-Since</code>`,
@@ -6495,8 +6500,9 @@ populates the <a>CORS-preflight cache</a> to minimize the number of these
64956500
<li><p>If <var>max-age</var> is greater than an imposed limit on
64966501
<a for="cache entry">max-age</a>, then set <var>max-age</var> to the imposed limit.
64976502

6498-
<li><p>If the user agent does not provide for a <a lt="CORS-preflight cache">cache</a>, then
6499-
return <var>response</var>.
6503+
<li><p>If the user agent does not provide for a <a lt="CORS-preflight cache">cache</a>,
6504+
or <a>WebDriver BiDi cache behavior</a> with <var>request</var> is "<code>bypass</code>",
6505+
then return <var>response</var>.
65006506

65016507
<li><p>For each <var>method</var> in <var>methods</var> for which there is a
65026508
<a>method cache entry match</a> using <var>request</var>, set matching entry's

0 commit comments

Comments
 (0)