Skip to content

Commit e5aeefc

Browse files
committed
Update the ORB spec to align with Firefox's implementation
1 parent 6744b8a commit e5aeefc

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
@@ -3328,8 +3328,7 @@ and a <a for=/>response</a> <var>response</var>, is to run these steps:
33283328
<li><p>If <var>response</var>'s <a for=response>status</a> is 206 and <var>mimeType</var> is an
33293329
<a>opaque-response-blocklisted MIME type</a>, then return false.
33303330

3331-
<li><p>If <var>nosniff</var> is true and <var>mimeType</var> is an
3332-
<a>opaque-response-blocklisted MIME type</a> or its <a for="MIME type">essence</a> is
3331+
<li><p>If <var>nosniff</var> is true and <var>mimeType</var>'s <a for="MIME type">essence</a> is
33333332
"<code>text/plain</code>", then return false.
33343333
</ol>
33353334

@@ -3461,6 +3460,7 @@ run these steps:</p>
34613460

34623461
<hr>
34633462

3463+
<div algorithm>
34643464
<p>To <dfn>obtain a copy of the first 1024 bytes of response</dfn>, given a <a for=/>response</a>
34653465
<var>response</var>, run these steps:
34663466

@@ -3522,9 +3522,11 @@ run these steps:</p>
35223522

35233523
<li>Return <var>first1024Bytes</var>.
35243524
</ol>
3525+
</div>
35253526

35263527
<hr>
35273528

3529+
<div algorithm>
35283530
<p>To <dfn>determine if response is JavaScript and not JSON</dfn> given a <a for=/>response</a>
35293531
<var>response</var>, run these steps:</p>
35303532

@@ -3580,6 +3582,7 @@ run these steps:</p>
35803582

35813583
<li><p>Return false.
35823584
</ol>
3585+
</div>
35833586

35843587

35853588
<h4 id=orb-mime-type-sets>New MIME type sets</h4>
@@ -3598,12 +3601,14 @@ run these steps:</p>
35983601
whose <a for="MIME type">essence</a> is one of:
35993602

36003603
<ul class=brief>
3604+
<li>"<code>application/dash+xml</code>"
36013605
<li>"<code>application/gzip</code>"
36023606
<li>"<code>application/msexcel</code>"
36033607
<li>"<code>application/mspowerpoint</code>"
36043608
<li>"<code>application/msword</code>"
36053609
<li>"<code>application/msword-template</code>"
36063610
<li>"<code>application/pdf</code>"
3611+
<li>"<code>application/vnd.apple.mpegurl</code>"
36073612
<li>"<code>application/vnd.ces-quickpoint</code>"
36083613
<li>"<code>application/vnd.ces-quicksheet</code>"
36093614
<li>"<code>application/vnd.ces-quickword</code>"
@@ -3629,10 +3634,16 @@ whose <a for="MIME type">essence</a> is one of:
36293634
<li>"<code>application/x-protobuf</code>"
36303635
<li>"<code>application/x-protobuffer</code>"
36313636
<li>"<code>application/zip</code>"
3637+
<li>"<code>audio/aac</code>"
3638+
<li>"<code>audio/aacp</code>"
3639+
<li>"<code>audio/mpegurl</code>"
3640+
<li>"<code>audio/mpeg</code>"
36323641
<li>"<code>multipart/byteranges</code>"
36333642
<li>"<code>multipart/signed</code>"
3643+
<li>"<code>multipart/x-mixed-replace</code>"
36343644
<li>"<code>text/event-stream</code>"
36353645
<li>"<code>text/csv</code>"
3646+
<li>"<code>text/vtt</code>"
36363647
</ul>
36373648

36383649

@@ -5638,9 +5649,15 @@ these steps:
56385649
<a>HTTP-network-or-cache fetch</a> given <var>fetchParams</var>.
56395650

56405651
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>opaque</code>",
5641-
<var>response</var>'s <a for=response>status</a> is not a <a>redirect status</a>, and the
5642-
<a>opaque-response-safelist check</a> given <var>request</var> and <var>response</var> returns
5643-
false, then return a <a>network error</a>.
5652+
<var>response</var>'s <a for=response>status</a> is not a <a>redirect status</a>, then
5653+
5654+
<ol>
5655+
<li><p>If <var>request</var>'s <a for=request>initiator type</a> is "<code>fetch</code>",
5656+
then set <var>internalResponse</var>'s <a for=response >body</a> to null.
5657+
5658+
<li><p>Otherwise, if <a>opaque-response-safelist check</a> given <var>request</var> and <var>response</var> returns
5659+
false, then return a <a>network error</a>.
5660+
</ol>
56445661

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

0 commit comments

Comments
 (0)