Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align spec more closely with cache freshening #1041

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4460,16 +4460,21 @@ Range Requests</cite>. [[HTTP-RANGE]] However, this is not widely supported by b
<a for=response>status</a> is <code>304</code>, then:

<ol>
<li>
<p>Update <var>storedResponse</var>'s <a for=response>header list</a> using
<var>forwardResponse</var>'s <a for=response>header list</a>, as per the
"<a href=https://tools.ietf.org/html/rfc7234#section-4.3.4>Freshening Stored Responses upon Validation</a>"
chapter of <cite>HTTP Caching</cite>. [[!HTTP-CACHING]]

<p class="note">This updates the stored response in cache as well.

<li><p>Set <var>response</var> to <var>storedResponse</var>.
<li><p> Set <var>selectedStoredResponse</var> to null.
<li><p> Set <var>selectedStoredResponse</var> to the result of selecting a response from the cache as per the "<a href=https://tools.ietf.org/html/rfc7234#section-4.3.4>Freshening Stored Responses upon Validation</a>" chapter of <cite>HTTP Caching</cite> [[!HTTP-CACHING]], if any.
<li><p> If <var>selectedStoredResponse</var> is not null, then:
<ol>
<li><p>Update <var>selectedStoredResponse</var>'s <a for=response>header list</a> using <var>forwardResponse</var>'s <a for=response>header list</a>, as per the "<a href=https://tools.ietf.org/html/rfc7234#section-4.3.4>Freshening Stored Responses upon Validation</a>" chapter of <cite>HTTP Caching</cite>. [[!HTTP-CACHING]]
<li><p class="note">This updates the stored response in cache as well.
<li><p>Set <var>response</var> to <var>selectedStoredResponse</var>.
</ol>

<li><p>Otherwise:
<ol>
<li><p> <a for="header list">Delete</a> `<code>If-None-Match</code>` from <var>httpRequest</var>'s <a for=request>header list</a>.
<li><p> <a for="header list">Delete</a> `<code>If-Modified-Since</code>` from <var>httpRequest</var>'s <a for=request>header list</a>.
<li><p>Set <var>forwardResponse</var> to be the result of making an <a>HTTP-network fetch</a> using <var>httpRequest</var>.
</ol>
</ol>

<li>
Expand Down