Skip to content

Commit 8bb671b

Browse files
committed
Only break for 101 in "websocket" mode
Also document how we should refactor this in the future. Tests: https://wpt.fyi/fetch/security/1xx-response.any.html. Fixes #1397.
1 parent 0d95632 commit 8bb671b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fetch.bs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5543,9 +5543,14 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
55435543

55445544
<li>
55455545
<p>If <var>status</var> is in the range 100 to 199, inclusive:
5546+
<!-- If there comes a time when there is another code besides 101 and 103 that needs special
5547+
processing we should generalize the "process early hints response" callback and invoke it
5548+
for each 1xx response and as such require callers like WebSockets to do the filtering and
5549+
processing we now perform here inline. -->
55465550

55475551
<ol>
5548-
<li><p>If <var>status</var> is 101, <a for=iteration>break</a>.
5552+
<li><p>If <var>request</var>'s <a for=request>mode</a> is "<code>websocket</code>" and
5553+
<var>status</var> is 101, then <a for=iteration>break</a>.
55495554

55505555
<li><p>If <var>status</var> is 103 and <var>fetchParams</var>'s
55515556
<a for="fetch params">process early hints response</a> is non-null, then

0 commit comments

Comments
 (0)