Re: [whatwg/fetch] The fetch pull algorithm does not pass proper bytesWritten to ReadableByteStreamControllerRespond (Issue #1610)

I think you are talking about the following case:

- current BYOB request view is non-null
- current BYOB request view's byte length > _available_
- Thus, _bytes_'s length = _available_ is less than current BYOB request view's byte length, and only _bytes_'s length is written

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:

- An optional _bytesWritten_ argument, as you suggest
- Something that abstracts most of steps 10.2.3.1-8 for the caller?

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

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

Received on Wednesday, 22 February 2023 01:27:30 UTC