Skip to content

Commit

Permalink
Disallow streaming upload on HTTP/1.x connections
Browse files Browse the repository at this point in the history
This is to reduce the risk to break existing HTTP/1.1 servers.

Fixes #966.
  • Loading branch information
yutakahirano authored Jun 16, 2022
1 parent f725059 commit 7149b15
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5447,11 +5447,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
<a for="fetch timing info">post-redirect start time</a>, and <var>fetchParams</var>'s
<a for="fetch params">cross-origin isolated capability</a>.

<li><p>If <var>connection</var> is not an HTTP/2 connection, <var>request</var>'s
<li><p>If <var>connection</var> is an HTTP/1.x connection, <var>request</var>'s
<a for=request>body</a> is non-null, and <var>request</var>'s <a for=request>body</a>'s
<a for=body>source</a> is null, then <a for="header list">append</a>
(`<code>Transfer-Encoding</code>`, `<code>chunked</code>`) to <var>request</var>'s
<a for=request>header list</a>.
<a for=body>source</a> is null, then return a <a>network error</a>.

<li>Set <var>timingInfo</var>'s <a for="fetch timing info">final network-request start time</a>
to the <a for=/>coarsened shared current time</a> given <var>fetchParams</var>'s
Expand Down Expand Up @@ -5525,10 +5523,6 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
therefore <var>response</var> represents both a <a for=/>response</a> and
an HTTP response here.

<p>If <var>request</var>'s <a for=request>header list</a> contains
(`<code>Transfer-Encoding</code>`, `<code>chunked</code>`) and <var>response</var> is
transferred via HTTP/1.0 or older, then return a <a>network error</a>.

<p>If the HTTP request results in a TLS client certificate dialog, then:

<ol>
Expand Down

0 comments on commit 7149b15

Please sign in to comment.