Skip to content

Commit

Permalink
Be more specific about referrers and integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed Oct 31, 2021
1 parent d2777a0 commit ebed0be
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#concept-header-list-get-structured-header">getting a structured field value</dfn></li>
<li><dfn data-x="concept-header-list-set" data-x-href="https://fetch.spec.whatwg.org/#concept-header-list-set">set</dfn></li>
<li><dfn data-x="concept-header-list-get-decode-split" data-x-href="https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split">get, decode, and split</dfn></li>
<li><dfn data-x="concept-header-name" data-x-href="https://fetch.spec.whatwg.org/#concept-header-name">header name</dfn></li>
<li><dfn data-x="concept-fetch-terminate" data-x-href="https://fetch.spec.whatwg.org/#concept-fetch-terminate">terminate</dfn></li>
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check">cross-origin resource policy check</dfn></li>
<li>the <dfn data-x-href="https://fetch.spec.whatwg.org/#requestcredentials"><code>RequestCredentials</code></dfn> enumeration</li>
Expand Down Expand Up @@ -25476,11 +25477,18 @@ document.body.appendChild(wbr);</code></pre>
"<code data-x="">GET</code>", return null.</p></li>

<li>
<p>If <var>req</var>'s <span data-x="concept-request-header-list">header list</span>
<span data-x="list is empty">is not empty</span>, return null.</p>
<p><span data-x="list iterate">For each</span> <var>header</var> in <var>req</var>'s
<span data-x="concept-request-header-list">header list</span>, if <var>header</var>'s
<span data-x="concept-header-name">name</span> is not "<code data-x="">Cache-Control</code>",
"<code data-x="">If-Modified-Since</code>", "<code data-x="">If-None-Match</code>",
"<code data-x="">Origin</code>", "<code data-x="">Pragma-Agent</code>",
"<code data-x="">Purpose</code>", "<code data-x="">Referer</code>", or
"<code data-x="">User-Agent</code>", return null.</p>

<p>Once it becomes possible to define a list of headers for preloads, the two lists are to be
compared.</p>
<p class="note">Once it becomes possible to define a list of headers for preloads, the two lists
can be compared to get a more definite match. However, the <span
data-x="concept-request-referrer">referrer</span> of the request is not a preload match
condition, as some referrers such as style URLs are not known when preloading.</p>
</li>

<li><p>Let <var>doc</var> be <var>win</var>'s
Expand Down Expand Up @@ -25509,13 +25517,22 @@ document.body.appendChild(wbr);</code></pre>
<li><p><var>resource</var>'s <span data-x="preloaded-resource-mode">mode</span> is
<var>req</var>'s <span data-x="concept-request-mode">mode</span></p></li>

<li><p><var>resource</var>'s
<span data-x="preloaded-resource-integrity-metadata">integrity metadata</span> is
<var>req</var>'s
<span data-x="concept-request-integrity-metadata">integrity metadata</span>, or
<var>req</var>'s
<span data-x="concept-request-integrity-metadata">integrity metadata</span> is an empty
string</p></li>
<li>
<p><var>resource</var>'s
<span data-x="preloaded-resource-integrity-metadata">integrity metadata</span> is
<var>req</var>'s
<span data-x="concept-request-integrity-metadata">integrity metadata</span>, or
<var>req</var>'s
<span data-x="concept-request-integrity-metadata">integrity metadata</span> is an empty
string</p>

<p class="note">User-agents can decide to allow resources to be used if their data matches
the request's <span data-x="concept-request-integrity-metadata">integrity metadata</span>,
even if the preloaded request had a different
<span data-x="preloaded-resource-integrity-metadata">integrity metadata</span>, however
this is an uncommon case (e.g. both a link and an image specified their integrity metadata
for the same data using a different hashing algorithm).</p>
</li>

<li><p><var>resource</var>'s
<span data-x="preloaded-resource-credentials-mode">credentials mode</span> is
Expand Down

0 comments on commit ebed0be

Please sign in to comment.