Skip to content

Commit 5818ed4

Browse files
committed
Update the ORB spec to align with Firefox's implementation
1 parent cbe9f32 commit 5818ed4

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

fetch.bs

+22-5
Original file line numberDiff line numberDiff line change
@@ -3333,8 +3333,7 @@ and a <a for=/>response</a> <var>response</var>, is to run these steps:
33333333
<li><p>If <var>response</var>'s <a for=response>status</a> is 206 and <var>mimeType</var> is an
33343334
<a>opaque-response-blocklisted MIME type</a>, then return false.
33353335

3336-
<li><p>If <var>nosniff</var> is true and <var>mimeType</var> is an
3337-
<a>opaque-response-blocklisted MIME type</a> or its <a for="MIME type">essence</a> is
3336+
<li><p>If <var>nosniff</var> is true and <var>mimeType</var>'s <a for="MIME type">essence</a> is
33383337
"<code>text/plain</code>", then return false.
33393338
</ol>
33403339

@@ -3466,6 +3465,7 @@ run these steps:</p>
34663465

34673466
<hr>
34683467

3468+
<div algorithm>
34693469
<p>To <dfn>obtain a copy of the first 1024 bytes of response</dfn>, given a <a for=/>response</a>
34703470
<var>response</var>, run these steps:
34713471

@@ -3527,9 +3527,11 @@ run these steps:</p>
35273527

35283528
<li>Return <var>first1024Bytes</var>.
35293529
</ol>
3530+
</div>
35303531

35313532
<hr>
35323533

3534+
<div algorithm>
35333535
<p>To <dfn>determine if response is JavaScript and not JSON</dfn> given a <a for=/>response</a>
35343536
<var>response</var>, run these steps:</p>
35353537

@@ -3585,6 +3587,7 @@ run these steps:</p>
35853587

35863588
<li><p>Return false.
35873589
</ol>
3590+
</div>
35883591

35893592

35903593
<h4 id=orb-mime-type-sets>New MIME type sets</h4>
@@ -3603,12 +3606,14 @@ run these steps:</p>
36033606
whose <a for="MIME type">essence</a> is one of:
36043607

36053608
<ul class=brief>
3609+
<li>"<code>application/dash+xml</code>"
36063610
<li>"<code>application/gzip</code>"
36073611
<li>"<code>application/msexcel</code>"
36083612
<li>"<code>application/mspowerpoint</code>"
36093613
<li>"<code>application/msword</code>"
36103614
<li>"<code>application/msword-template</code>"
36113615
<li>"<code>application/pdf</code>"
3616+
<li>"<code>application/vnd.apple.mpegurl</code>"
36123617
<li>"<code>application/vnd.ces-quickpoint</code>"
36133618
<li>"<code>application/vnd.ces-quicksheet</code>"
36143619
<li>"<code>application/vnd.ces-quickword</code>"
@@ -3634,10 +3639,16 @@ whose <a for="MIME type">essence</a> is one of:
36343639
<li>"<code>application/x-protobuf</code>"
36353640
<li>"<code>application/x-protobuffer</code>"
36363641
<li>"<code>application/zip</code>"
3642+
<li>"<code>audio/aac</code>"
3643+
<li>"<code>audio/aacp</code>"
3644+
<li>"<code>audio/mpegurl</code>"
3645+
<li>"<code>audio/mpeg</code>"
36373646
<li>"<code>multipart/byteranges</code>"
36383647
<li>"<code>multipart/signed</code>"
3648+
<li>"<code>multipart/x-mixed-replace</code>"
36393649
<li>"<code>text/event-stream</code>"
36403650
<li>"<code>text/csv</code>"
3651+
<li>"<code>text/vtt</code>"
36413652
</ul>
36423653

36433654

@@ -5643,9 +5654,15 @@ these steps:
56435654
<a>HTTP-network-or-cache fetch</a> given <var>fetchParams</var>.
56445655

56455656
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>opaque</code>",
5646-
<var>response</var>'s <a for=response>status</a> is not a <a>redirect status</a>, and the
5647-
<a>opaque-response-safelist check</a> given <var>request</var> and <var>response</var> returns
5648-
false, then return a <a>network error</a>.
5657+
<var>response</var>'s <a for=response>status</a> is not a <a>redirect status</a>, then
5658+
5659+
<ol>
5660+
<li><p>If <var>request</var>'s <a for=request>initiator type</a> is "<code>fetch</code>",
5661+
then set <var>internalResponse</var>'s <a for=response >body</a> to null.
5662+
5663+
<li><p>Otherwise, if <a>opaque-response-safelist check</a> given <var>request</var> and <var>response</var> returns
5664+
false, then return a <a>network error</a>.
5665+
</ol>
56495666

56505667
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>cors</code>" and
56515668
the <a>CORS check</a> for <var>request</var> and <var>response</var> returns failure, then return

0 commit comments

Comments
 (0)