Skip to content

Commit fa26508

Browse files
recvfrompmeenan
authored andcommitted
Partition blob: URL fetches by storage key
See w3c/FileAPI#153 (comment) and w3c/FileAPI#201 for additional context. And https://privacycg.github.io/storage-partitioning/ for the overall partitioning story.
1 parent b6c8a1f commit fa26508

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

fetch.bs

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4980,15 +4980,28 @@ steps:
49804980
<a for=url>blob URL entry</a>.
49814981

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

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

4991-
<li><p>Let <var>blob</var> be <var>blobURLEntry</var>'s <a for="blob URL entry">object</a>.
4989+
<li><p>Let <var>requestEnvironment</var> be the result of
4990+
<a for=request>determining the environment</a> given <var>request</var>.
4991+
4992+
<li><p>Let <var>isTopLevelNavigation</var> be true if <var>request</var>'s
4993+
<a for=request>destination</a> is "<code>document</code>"; otherwise, false.
4994+
4995+
<li><p>If <var>isTopLevelNavigation</var> is false and <var>requestEnvironment</var> is null,
4996+
then return a <a>network error</a>.
4997+
4998+
<li><p>Let <var>navigationOrEnvironment</var> be the string "<code>navigation</code>" if
4999+
<var>isTopLevelNavigation</var> is true; otherwise, <var>requestEnvironment</var>.
5000+
5001+
<li><p>Let <var>blob</var> be the result of <a>obtaining a blob object</a> given
5002+
<var>blobURLEntry</var> and <var>navigationOrEnvironment</var>.
5003+
5004+
<li><p>If <var>blob</var> is not a {{Blob}} object, then return a <a>network error</a>.
49925005

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

@@ -5121,6 +5134,21 @@ steps:
51215134
</ol>
51225135
</div>
51235136

5137+
<div algorithm>
5138+
<p>To <dfn for=request>determine the environment</dfn>, given a <a for=/>request</a>
5139+
<var>request</var>:
5140+
5141+
<ol>
5142+
<li><p>If <var>request</var>'s <a for=request>reserved client</a> is non-null, then return
5143+
<var>request</var>'s <a for=request>reserved client</a>.
5144+
5145+
<li><p>If <var>request</var>'s <a for=request>client</a> is non-null, then return
5146+
<var>request</var>'s <a for=request>client</a>.
5147+
5148+
<li><p>Return null.
5149+
</ol>
5150+
</div>
5151+
51245152

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

@@ -9105,6 +9133,7 @@ Alexey Proskuryakov,
91059133
Andreas Kling,
91069134
Andrés Gutiérrez,
91079135
Andrew Sutherland,
9136+
Andrew Williams,<!-- recvfrom; GitHub -->
91089137
Ángel González,
91099138
Anssi Kostiainen,
91109139
Arkadiusz Michalski,

0 commit comments

Comments
 (0)