-
Notifications
You must be signed in to change notification settings - Fork 351
The fetch pull algorithm does not pass proper bytesWritten to ReadableByteStreamControllerRespond #1610
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
Comments
|
I think you are talking about the following case:
Indeed the caller could create a new Uint8Array wrapping the underlying AB, but that is kind of annoying, and there's no nice Web IDL helper for it. So yeah maybe Streams should provide more help here. Ideas:
|
Gecko has an internal implementation that converts any internal byte stream to ReadableStream (that is also used for Fetch), so having an abstraction in the Streams spec would probably better match with Gecko. |
Helps with whatwg/fetch#1610. Co-authored-by: Domenic Denicola <[email protected]>
Introduced in whatwg/streams#1263. Fixes #1610.
(Talking about https://fetch.spec.whatwg.org/#concept-http-network-fetch step 10 that is modified by #1593)
Implementing the algorithm as-is forces the size of resulting array buffer view be equal to that of the byob request view.
The caller may do some subarraying, but maybe the
enqueue
algorithm should receivebytesWritten
as an argument?The text was updated successfully, but these errors were encountered: