Re: [streams] Custom tee function (#401)

@annevk

```
fetch(new Request(url, {body: rs}))
```

- if `rs` is a user-constructed stream:
  A user might want to limit the number of in-flight bytes until the response status arrives (especially for infinite streams).
- if `rs` is replayable (e.g. made from a blob):
 An implementer may want to skip the default implementation and use an efficient algorithm instead.

Sorry I mixed these two issues.

For the latter, I would set `shouldClone` parameter for `tee()`. If ReadableByteStream (or ReadableStream for bytes) allows an implementer to coalesce buffers, the implementer can optimize the operation without an observable behavior change, I think.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/401#issuecomment-152959650

Received on Monday, 2 November 2015 08:55:50 UTC