Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should body be set up as a byte stream? #1572

Closed
saschanaz opened this issue Dec 14, 2022 · 1 comment
Closed

Should body be set up as a byte stream? #1572

saschanaz opened this issue Dec 14, 2022 · 1 comment

Comments

@saschanaz
Copy link
Member

saschanaz commented Dec 14, 2022

Currently this succeeds on Firefox and fails on Chrome:

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

Firefox creates body as a byte 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" 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?

@domenic
Copy link
Member

domenic commented Dec 14, 2022

Dupe of #267.

@domenic domenic closed this as completed Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants