Re: [whatwg/fetch] Use ReadableStreamPipeTo in Request constructor (#959)

ricea commented on this pull request.



> @@ -6224,17 +6224,19 @@ constructor must run these steps:
   <p>If <var>inputBody</var> is <var>body</var> and <var>inputBody</var> is non-null, then:
 
   <ol>
-   <li>
-    <p>Let <var>rs</var> bs a {{ReadableStream}} object from which one can read the exactly
-    same data as one could read from <var>inputBody</var>'s <a for=body>stream</a>.
+   <li><p>Let <var>ws</var> and <var>rs</var> be the
+   <a href="https://streams.spec.whatwg.org/#writable-side">writable side</a> and
+   <a href="https://streams.spec.whatwg.org/#readable-side">readable side</a> of an
+   <a href="https://streams.spec.whatwg.org/#identity-transform-stream">identity transform
+   stream</a> respectively.</li>

I think it would be better to have a comma before "respectively", but not 100% confident of this.

>  
-    <p class=XXX>This will be specified more precisely once
-    <a href=https://streams.spec.whatwg.org/#ts-model>transform stream</a> and
-    <a href=https://streams.spec.whatwg.org/#pipe-chains>piping</a> are precisely defined.
-    See <a href=https://github.com/whatwg/fetch/issues/463>issue #463</a>.
+   <li>
+    <p>Call <a abstract-op>ReadableStreamPipeTo</a>(<var>inputBody</var>,

I think we need to set [[PromiseIsHandled]] on the promise returned from ReadableStreamPipeTo, similar to [how pipeThrough does it](https://streams.spec.whatwg.org/#rs-pipe-through). This will stop uncaught promise rejections being visible when a stream is errored.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/959#pullrequestreview-313128139

Received on Thursday, 7 November 2019 06:23:55 UTC