[whatwg/fetch] Should `body` be set up as a byte stream? (Issue #1572)

Currently this succeeds on Firefox and fails on Chrome:

```js
new Response(new Uint8Array([1,2])).body.getReader({mode: 'byob'})
```

Firefox creates body as a body stream: https://searchfox.org/mozilla-central/rev/43cb6eca1c3069d46d589d52ab4949257e630d19/dom/streams/ReadableStream.cpp#871

But the spec does not actually use "[set up with byte reading support](https://streams.spec.whatwg.org/#readablestream-set-up-with-byte-reading-support)" algorithm, and I see no relevant test for this.

I think it should support byte stream as fetch is all about bytes. What do you think?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1572
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1572@github.com>

Received on Wednesday, 14 December 2022 02:37:42 UTC