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

Partition Blob URL fetches by Storage Key #1783

Merged
merged 11 commits into from
Dec 9, 2024
43 changes: 38 additions & 5 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4970,15 +4970,32 @@ steps:
<a for=url>blob URL entry</a>.

<li>
<p>If <var>request</var>'s <a for=request>method</a> is not `<code>GET</code>`,
<var>blobURLEntry</var> is null, or <var>blobURLEntry</var>'s
<a for="blob URL entry">object</a> is not a {{Blob}} object, then return a
<a>network error</a>. [[!FILEAPI]]
<p>If <var>request</var>'s <a for=request>method</a> is not `<code>GET</code>` or
<var>blobURLEntry</var> is null, then return a <a>network error</a>. [[!FILEAPI]]

<p class=note>The `<code>GET</code>` <a for=/>method</a> restriction serves no useful purpose
other than being interoperable.

<li><p>Let <var>blob</var> be <var>blobURLEntry</var>'s <a for="blob URL entry">object</a>.
<li><p>Let <var>requestEnvironment</var> be the result of
<a for=request>determining the environment</a> given <var>request</var>.

<li><p>Let <var>isTopLevelNavigation</var> be true if <var>request</var>'s <a
for=request>destination</a> is "<code>document</code>"; otherwise, false.

<li><p>If <var>isTopLevelNavigation</var> is false and <var>requestEnvironment</var> is null,
then return a <a>network error</a>.

<li><p>Let <var>blob</var> be null.

<li><p>If <var>isTopLevelNavigation</var> is true, then set <var>blob</var> to the result of
<a href="https://w3c.github.io/FileAPI/#blob-url-obtain-object">obtaining a blob object</a>
recvfrom marked this conversation as resolved.
Show resolved Hide resolved
given <var>blobURLEntry</var> and the string "<code>navigation</code>".
recvfrom marked this conversation as resolved.
Show resolved Hide resolved

<li><p>Otherwise, set <var>blob</var> to the result of <a
href="https://w3c.github.io/FileAPI/#blob-url-obtain-object">obtaining a blob object</a> given
<var>blobURLEntry</var> and <var>requestEnvironment</var>.

<li><p>If <var>blob</var> is not a {{Blob}} object, then return a <a>network error</a>.

<li><p>Let <var>response</var> be a new <a for=/>response</a>.

Expand Down Expand Up @@ -5111,6 +5128,21 @@ steps:
</ol>
</div>

<div algorithm>
<p>To <dfn for=request>determine the environment</dfn>, given a <a for=/>request</a>
<var>request</var>:

<ol>
<li><p>If <var>request</var>'s <a for=request>reserved client</a> is non-null, then return
<var>request</var>'s <a for=request>reserved client</a>.

<li><p>If <var>request</var>'s <a for=request>client</a> is non-null, then return
<var>request</var>'s <a for=request>client</a>.

<li><p>Return null.
</ol>
</div>


<h3 id=http-fetch>HTTP fetch</h3>

Expand Down Expand Up @@ -9042,6 +9074,7 @@ Alexey Proskuryakov,
Andreas Kling,
Andrés Gutiérrez,
Andrew Sutherland,
Andrew Williams,<!-- recvfrom; GitHub -->
Ángel González,
Anssi Kostiainen,
Arkadiusz Michalski,
Expand Down