Skip to content

Commit 7d86734

Browse files
committed
Added support for dictionary matching
1 parent cd5a16d commit 7d86734

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

fetch.bs

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6263,8 +6263,9 @@ run these steps:
62636263
<li><p>If <var>httpRequest</var>'s <a for=request>cache mode</a> is
62646264
"<code>only-if-cached</code>", then return a <a>network error</a>.
62656265

6266-
<li><p>Let <var>forwardResponse</var> be the result of running <a>HTTP-network fetch</a> given
6267-
<var>httpFetchParams</var>, <var>includeCredentials</var>, and <var>isNewConnectionFetch</var>.
6266+
<li><p>Let <var>forwardResponse</var> be the result of running
6267+
<a>HTTP-network compression-dictionary fetch</a> given <var>httpFetchParams</var>,
6268+
<var>includeCredentials</var>, and <var>isNewConnectionFetch</var>.
62686269

62696270
<li><p>If <var>httpRequest</var>'s <a for=request>method</a> is <a>unsafe</a> and
62706271
<var>forwardResponse</var>'s <a for=response>status</a> is in the range 200 to 399, inclusive,
@@ -6453,6 +6454,47 @@ run these steps:
64536454
</ol>
64546455
</div>
64556456

6457+
<h3 id=http-network-compression-dictionary-fetch>HTTP-network compression-dictionary fetch</h3>
6458+
6459+
<div algorithm>
6460+
<p>To <dfn>HTTP-network compression-dictionary fetch</dfn>, given a <a for=/>fetch params</a>
6461+
<var>fetchParams</var>, an optional boolean <var>includeCredentials</var> (default false), and an
6462+
optional boolean <var>forceNewConnection</var> (default false), run these steps:
6463+
6464+
<ol>
6465+
<li><p>Let <var>request</var> be <var>fetchParams</var>'s <a for="fetch params">request</a>.
6466+
6467+
<li><p>If <var>request</var>'s <a for=request>mode</a> is "<code>no-cors</code>", then return the result of
6468+
running <a>HTTP-network fetch</a> given <var>fetchParams</var>, <var>includeCredentials</var>, and
6469+
<var>forceNewConnection</var>.
6470+
6471+
<li><p>If the user agent is configured to block cookies for <var>request</var>, then return the
6472+
result of running <a>HTTP-network fetch</a> given <var>fetchParams</var>,
6473+
<var>includeCredentials</var>, and <var>forceNewConnection</var>.
6474+
6475+
<li><p>Let <var>compressionDictionaryCache</var> be the result of
6476+
<a>determining the compression-dictionary cache partition</a> given <var>request</var>.
6477+
6478+
<li><p>If <var>compressionDictionaryCache</var> is null, then return the result of running
6479+
<a>HTTP-network fetch</a> given <var>fetchParams</var>, <var>includeCredentials</var>, and
6480+
<var>forceNewConnection</var>.
6481+
6482+
<li><p>Let <var>bestMatch</var> be the result of finding the best matching dictionary in
6483+
<var>compressionDictionaryCache</var> for <var>request</var> as defined in [[!HTTP-COMPRESSION-DICTIONARIES]].
6484+
6485+
<li><p>If <var>bestMatch</var> is null, then return the result of running <a>HTTP-network fetch</a>
6486+
given <var>fetchParams</var>, <var>includeCredentials</var>, and <var>forceNewConnection</var>.
6487+
6488+
<li><p>Add the `<code>Available-Dictionary</code>` and `<code>Dictionary-ID</code>` (if applicable) headers to <var>request</var> using <var>bestMatch</var> as defined in [[!HTTP-COMPRESSION-DICTIONARIES]].
6489+
6490+
<li><p><a>Combine</a> (`<code>Accept-Encoding</code>`, `<code>dcb</code>`) in <var>request</var>'s <a for=request>header list</a>.
6491+
6492+
<li><p><a>Combine</a> (`<code>Accept-Encoding</code>`, `<code>dcz</code>`) in <var>request</var>'s <a for=request>header list</a>.
6493+
6494+
<li><p>Return the result of running <a>HTTP-network fetch</a> given <var>fetchParams</var>,
6495+
<var>includeCredentials</var>, and <var>forceNewConnection</var>.
6496+
</ol>
6497+
</div>
64566498

64576499
<h3 id=http-network-fetch>HTTP-network fetch</h3>
64586500

0 commit comments

Comments
 (0)