Skip to content

Commit c83edf6

Browse files
committed
Fix various cases that should have talked about the internal response, but didn't. Fixes #23 again (and better this time).
1 parent 07ed6ea commit c83edf6

File tree

2 files changed

+80
-66
lines changed

2 files changed

+80
-66
lines changed

Overview.html

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,20 +1599,6 @@ <h3 id="main-fetch"><span class="secno">5.1 </span>Main fetch</h3>
15991599
<li><p>If <a href="#concept-main-fetch" title="concept-main-fetch">main fetch</a> is invoked recursively, return
16001600
<var title="">response</var>.
16011601

1602-
<li><p>Set <var title="">response</var>'s
1603-
<a href="#concept-response-url-list" title="concept-response-url-list">url list</a> to a copy of
1604-
<var title="">request</var>'s <a href="#concept-request-url-list" title="concept-request-url-list">url list</a>.
1605-
1606-
<li><p>If
1607-
<a href="https://w3c.github.io/webappsec/specs/mixedcontent/#should-block-response">should <var>response</var> to <var>request</var> be blocked as mixed content</a>,
1608-
<span class="XXX">should <var><a href="#response">response</a></var> to <var><a href="#request">request</a></var> be blocked as content security</span>,
1609-
or
1610-
<a href="#should-response-to-request-be-blocked-due-to-nosniff?">should <var title="">response</var> to <var title="">request</var> be blocked due to nosniff</a>
1611-
returns <b title="">blocked</b>, set <var title="">response</var> to a
1612-
<a href="#concept-network-error" title="concept-network-error">network error</a>.
1613-
<a href="#refsMIX">[MIX]</a>
1614-
<a href="#refsCSP">[CSP]</a>
1615-
16161602
<li>
16171603
<p>If <var title="">response</var> is not a
16181604
<a href="#concept-network-error" title="concept-network-error">network error</a> and
@@ -1634,25 +1620,39 @@ <h3 id="main-fetch"><span class="secno">5.1 </span>Main fetch</h3>
16341620
<dd><a href="#concept-filtered-response-opaque" title="concept-filtered-response-opaque">opaque filtered response</a>
16351621
</dl>
16361622

1623+
<li><p>Let <var>internalResponse</var> be <var title="">response</var>'s
1624+
<a href="#concept-internal-response" title="concept-internal-response">internal response</a>.
1625+
1626+
<li><p>Set <var title="">internalResponse</var>'s
1627+
<a href="#concept-response-url-list" title="concept-response-url-list">url list</a> to a copy of
1628+
<var title="">request</var>'s <a href="#concept-request-url-list" title="concept-request-url-list">url list</a>.
1629+
1630+
<li><p>If
1631+
<a href="https://w3c.github.io/webappsec/specs/mixedcontent/#should-block-response">should <var>internalResponse</var> to <var>request</var> be blocked as mixed content</a>,
1632+
<span class="XXX">should <var>internalResponse</var> to <var title="">request</var> be blocked as content security</span>,
1633+
or
1634+
<span>should <var>internalResponse</var> to <var><a href="#request">request</a></var> be blocked due to nosniff</span>
1635+
returns <b title="">blocked</b>, set <var title="">response</var> to a
1636+
<a href="#concept-network-error" title="concept-network-error">network error</a>.
1637+
<a href="#refsMIX">[MIX]</a>
1638+
<a href="#refsCSP">[CSP]</a>
1639+
16371640
<li>
16381641
<p>If <var title="">request</var>'s <a href="#concept-request-method" title="concept-request-method">method</a>
16391642
is `<code title="">HEAD</code>` or `<code title="">CONNECT</code>`, or
1640-
<var title="">response</var>'s
1641-
<a href="#concept-internal-response" title="concept-internal-response">internal response</a>'s
1643+
<var title="">internalResponse</var>'s
16421644
<a href="#concept-response-status" title="concept-response-status">status</a> is <code title="">101</code>,
16431645
<code title="">204</code>, <code title="">205</code>, or <code title="">304</code>, set
1644-
<var title="">response</var>'s
1645-
<a href="#concept-internal-response" title="concept-internal-response">internal response</a>'s
1646-
<a href="#concept-response-body" title="concept-response-body">body</a> to null and disregard any pushing toward
1647-
it (if any).
1646+
<var title="">internalResponse</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> to
1647+
null and disregard any pushing toward it (if any).
16481648

16491649
<p class="note">This standardizes the error handling for servers that violate HTTP.
16501650

16511651
<li>
16521652
<p>If <var title="">request</var>'s <a href="#synchronous-flag">synchronous flag</a> is set, wait for
16531653
either end-of-file to have been pushed to
1654-
<var title="">response</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> or for
1655-
<var title="">response</var> to have a
1654+
<var title="">internalResponse</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> or for
1655+
<var title="">internalResponse</var> to have a
16561656
<a href="#concept-response-termination-reason" title="concept-response-termination-reason">termination reason</a>, and then
16571657
return <var title="">response</var>.
16581658

@@ -1670,7 +1670,7 @@ <h3 id="main-fetch"><span class="secno">5.1 </span>Main fetch</h3>
16701670
<dfn id="process-response">process response</dfn> for <var title="">response</var>.
16711671

16721672
<li>
1673-
<p>If <var title="">response</var>'s
1673+
<p>If <var title="">internalResponse</var>'s
16741674
<a href="#concept-response-body" title="concept-response-body">body</a> is null, run these substeps:
16751675

16761676
<ol>
@@ -1682,22 +1682,22 @@ <h3 id="main-fetch"><span class="secno">5.1 </span>Main fetch</h3>
16821682
</ol>
16831683

16841684
<li>
1685-
<p>Otherwise, if <var title="">response</var>'s
1685+
<p>Otherwise, if <var title="">internalResponse</var>'s
16861686
<a href="#concept-response-body" title="concept-response-body">body</a> is non-null, run these substeps:
16871687

16881688
<ol>
1689-
<li><p>Whenever <var title="">response</var>'s
1689+
<li><p>Whenever <var title="">internalResponse</var>'s
16901690
<a href="#concept-response-body" title="concept-response-body">body</a>'s is pushed to, for and as long as
1691-
<var title="">response</var> has no
1691+
<var title="">internalResponse</var> has no
16921692
<a href="#concept-response-termination-reason" title="concept-response-termination-reason">termination reason</a> and
16931693
end-of-file has not been pushed,
16941694
<a href="#queue-a-fetch-task">queue a fetch task</a> on <var title="">request</var> to
16951695
<a href="#process-response-body">process response body</a> for <var title="">response</var>.
16961696

16971697
<li>
1698-
<p>Once end-of-file has been pushed to <var title="">response</var>'s
1699-
<a href="#concept-response-body" title="concept-response-body">body</a> or <var title="">response</var> has a
1700-
<a href="#concept-response-termination-reason" title="concept-response-termination-reason">termination reason</a>,
1698+
<p>Once end-of-file has been pushed to <var title="">internalResponse</var>'s
1699+
<a href="#concept-response-body" title="concept-response-body">body</a> or <var title="">internalResponse</var> has
1700+
a <a href="#concept-response-termination-reason" title="concept-response-termination-reason">termination reason</a>,
17011701
<a href="#queue-a-fetch-done-task">queue a fetch-done task</a> using <var title="">request</var> and
17021702
<var title="">response</var>.
17031703

@@ -1973,9 +1973,15 @@ <h3 id="http-fetch"><span class="secno">5.3 </span>HTTP fetch</h3>
19731973
<a href="#concept-response" title="concept-response">response</a> from a service worker.
19741974
</ol>
19751975

1976+
<li>Let <var title="">status</var> be <var title="">response</var>'s
1977+
<a href="#concept-response-status" title="concept-response-status">status</a>, if <var title="">response</var> is not a
1978+
<a href="#concept-filtered-response" title="concept-filtered-response">filtered response</a>, and
1979+
<var title="">response</var>'s
1980+
<a href="#concept-internal-response" title="concept-internal-response">internal response</a>'s
1981+
<a href="#concept-response-status" title="concept-response-status">status</a> otherwise.
1982+
19761983
<li>
1977-
<p>Then, switch on <var title="">response</var>'s
1978-
<a href="#concept-response-status" title="concept-response-status">status</a>:
1984+
<p>Switch on <var title="">status</var>:
19791985

19801986
<dl class="switch">
19811987
<dt><code title="">304</code>
@@ -2163,8 +2169,9 @@ <h3 id="http-fetch"><span class="secno">5.3 </span>HTTP fetch</h3>
21632169
<a href="#refsHTTPAUTH">[HTTPAUTH]</a>
21642170

21652171
<li><p>Return <var title="">response</var>. <span class="note no-backref">Typically
2166-
<var title="">response</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> is still being
2167-
pushed to after returning.</span>
2172+
<var title="">response</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> (or that of the
2173+
<a href="#concept-internal-response" title="concept-internal-response">internal response</a>) is still being pushed to
2174+
after returning.</span>
21682175
</ol>
21692176

21702177

Overview.src.html

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,20 +1546,6 @@ <h3>Main fetch</h3>
15461546
<li><p>If <span title=concept-main-fetch>main fetch</span> is invoked recursively, return
15471547
<var title>response</var>.
15481548

1549-
<li><p>Set <var title>response</var>'s
1550-
<span title=concept-response-url-list>url list</span> to a copy of
1551-
<var title>request</var>'s <span title=concept-request-url-list>url list</span>.
1552-
1553-
<li><p>If
1554-
<a href=https://w3c.github.io/webappsec/specs/mixedcontent/#should-block-response>should <var>response</var> to <var>request</var> be blocked as mixed content</a>,
1555-
<span class=XXX>should <var>response</var> to <var>request</var> be blocked as content security</span>,
1556-
or
1557-
<span>should <var title>response</var> to <var title>request</var> be blocked due to nosniff</span>
1558-
returns <b title>blocked</b>, set <var title>response</var> to a
1559-
<span title=concept-network-error>network error</span>.
1560-
<span data-anolis-ref>MIX</span>
1561-
<span data-anolis-ref>CSP</span>
1562-
15631549
<li>
15641550
<p>If <var title>response</var> is not a
15651551
<span title=concept-network-error>network error</span> and
@@ -1581,25 +1567,39 @@ <h3>Main fetch</h3>
15811567
<dd><span title=concept-filtered-response-opaque>opaque filtered response</span>
15821568
</dl>
15831569

1570+
<li><p>Let <var>internalResponse</var> be <var title>response</var>'s
1571+
<span title=concept-internal-response>internal response</span>.
1572+
1573+
<li><p>Set <var title>internalResponse</var>'s
1574+
<span title=concept-response-url-list>url list</span> to a copy of
1575+
<var title>request</var>'s <span title=concept-request-url-list>url list</span>.
1576+
1577+
<li><p>If
1578+
<a href=https://w3c.github.io/webappsec/specs/mixedcontent/#should-block-response>should <var>internalResponse</var> to <var>request</var> be blocked as mixed content</a>,
1579+
<span class=XXX>should <var>internalResponse</var> to <var title>request</var> be blocked as content security</span>,
1580+
or
1581+
<span>should <var>internalResponse</var> to <var>request</var> be blocked due to nosniff</span>
1582+
returns <b title>blocked</b>, set <var title>response</var> to a
1583+
<span title=concept-network-error>network error</span>.
1584+
<span data-anolis-ref>MIX</span>
1585+
<span data-anolis-ref>CSP</span>
1586+
15841587
<li>
15851588
<p>If <var title>request</var>'s <span title=concept-request-method>method</span>
15861589
is `<code title>HEAD</code>` or `<code title>CONNECT</code>`, or
1587-
<var title>response</var>'s
1588-
<span title=concept-internal-response>internal response</span>'s
1590+
<var title>internalResponse</var>'s
15891591
<span title=concept-response-status>status</span> is <code title>101</code>,
15901592
<code title>204</code>, <code title>205</code>, or <code title>304</code>, set
1591-
<var title>response</var>'s
1592-
<span title=concept-internal-response>internal response</span>'s
1593-
<span title=concept-response-body>body</span> to null and disregard any pushing toward
1594-
it (if any).
1593+
<var title>internalResponse</var>'s <span title=concept-response-body>body</span> to
1594+
null and disregard any pushing toward it (if any).
15951595

15961596
<p class=note>This standardizes the error handling for servers that violate HTTP.
15971597

15981598
<li>
15991599
<p>If <var title>request</var>'s <span>synchronous flag</span> is set, wait for
16001600
either end-of-file to have been pushed to
1601-
<var title>response</var>'s <span title=concept-response-body>body</span> or for
1602-
<var title>response</var> to have a
1601+
<var title>internalResponse</var>'s <span title=concept-response-body>body</span> or for
1602+
<var title>internalResponse</var> to have a
16031603
<span title=concept-response-termination-reason>termination reason</span>, and then
16041604
return <var title>response</var>.
16051605

@@ -1617,7 +1617,7 @@ <h3>Main fetch</h3>
16171617
<dfn>process response</dfn> for <var title>response</var>.
16181618

16191619
<li>
1620-
<p>If <var title>response</var>'s
1620+
<p>If <var title>internalResponse</var>'s
16211621
<span title=concept-response-body>body</span> is null, run these substeps:
16221622

16231623
<ol>
@@ -1629,22 +1629,22 @@ <h3>Main fetch</h3>
16291629
</ol>
16301630

16311631
<li>
1632-
<p>Otherwise, if <var title>response</var>'s
1632+
<p>Otherwise, if <var title>internalResponse</var>'s
16331633
<span title=concept-response-body>body</span> is non-null, run these substeps:
16341634

16351635
<ol>
1636-
<li><p>Whenever <var title>response</var>'s
1636+
<li><p>Whenever <var title>internalResponse</var>'s
16371637
<span title=concept-response-body>body</span>'s is pushed to, for and as long as
1638-
<var title>response</var> has no
1638+
<var title>internalResponse</var> has no
16391639
<span title=concept-response-termination-reason>termination reason</span> and
16401640
end-of-file has not been pushed,
16411641
<span>queue a fetch task</span> on <var title>request</var> to
16421642
<span>process response body</span> for <var title>response</var>.
16431643

16441644
<li>
1645-
<p>Once end-of-file has been pushed to <var title>response</var>'s
1646-
<span title=concept-response-body>body</span> or <var title>response</var> has a
1647-
<span title=concept-response-termination-reason>termination reason</span>,
1645+
<p>Once end-of-file has been pushed to <var title>internalResponse</var>'s
1646+
<span title=concept-response-body>body</span> or <var title>internalResponse</var> has
1647+
a <span title=concept-response-termination-reason>termination reason</span>,
16481648
<span>queue a fetch-done task</span> using <var title>request</var> and
16491649
<var title>response</var>.
16501650

@@ -1920,9 +1920,15 @@ <h3>HTTP fetch</h3>
19201920
<span title=concept-response>response</span> from a service worker.
19211921
</ol>
19221922

1923+
<li>Let <var title>status</var> be <var title>response</var>'s
1924+
<span title=concept-response-status>status</span>, if <var title>response</var> is not a
1925+
<span title=concept-filtered-response>filtered response</span>, and
1926+
<var title>response</var>'s
1927+
<span title=concept-internal-response>internal response</span>'s
1928+
<span title=concept-response-status>status</span> otherwise.
1929+
19231930
<li>
1924-
<p>Then, switch on <var title>response</var>'s
1925-
<span title=concept-response-status>status</span>:
1931+
<p>Switch on <var title>status</var>:
19261932

19271933
<dl class=switch>
19281934
<dt><code title>304</code>
@@ -2110,8 +2116,9 @@ <h3>HTTP fetch</h3>
21102116
<span data-anolis-ref>HTTPAUTH</span>
21112117

21122118
<li><p>Return <var title>response</var>. <span class="note no-backref">Typically
2113-
<var title>response</var>'s <span title=concept-response-body>body</span> is still being
2114-
pushed to after returning.</span>
2119+
<var title>response</var>'s <span title=concept-response-body>body</span> (or that of the
2120+
<span title=concept-internal-response>internal response</span>) is still being pushed to
2121+
after returning.</span>
21152122
</ol>
21162123

21172124

0 commit comments

Comments
 (0)