-
Notifications
You must be signed in to change notification settings - Fork 313
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
consider adding a note that response body may be re-buffered in browser #1573
Comments
For context, we got a bug from someone expecting that readablestream chunks would pass through in their original form: https://bugs.chromium.org/p/chromium/issues/detail?id=1188114 |
When I wrote a comment in whatwg/fetch#267 (comment) in response to @ricea I did not expect it to already be a problem. 😊 I agree we should define this better. Ideally we'd also tackle the magic thread-boundary crossing at the same time. (I think at least part of it should be here as the service worker needs to start this, but the infrastructure for it can be defined in Fetch and shared with the request side perhaps.) |
Hey there, I was wondering if Transferable Streams (chrome support) could allow service workers to pass data directly to the target frame without getting re-buffered with a fixed size. Passing a stream from a service worker to a webpage via transferable streams(using So since the tech is already there(at least for chrome), i was wondering if it'd just be possible to use it for fetch's |
When a response is passed to respondWith() most (all?) browsers will end up serializing the body through some kind of data pipe with a fixed capacity. This means that a response constructed with a ReadableStream body may see the data chunks get re-buffered into different size chunks on the other side. It would be nice if the spec captured this in some way. Perhaps as a note if it can't really be represented in normative text.
Not sure if this should be here or in fetch. cc @annevk
The text was updated successfully, but these errors were encountered: