-
Notifications
You must be signed in to change notification settings - Fork 349
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
Add chunk type checking of requestForServiceWorker's body's stream #1199
Conversation
Ping? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see https://github.com/whatwg/fetch#formatting for the formatting rules (and add missing rules if there are).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me modulo nits. Is everyone else happy with this as well. @ricea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Tentative commit message:
@yoichio it's not clear to me how this fixes #267 as we still don't use BYOB streams, right? It sounds like that only matters for responses so doesn't block upload streams, but it's still something that needs to be done? |
I wonder if it's too strict? Do implementations accept other types than Uint8Array? For comparison, a readable byte stream will accept any kind of ArrayBufferView and convert it to a Uint8Array. |
For response streams I think all implementations have this restriction. Request streams are a "new" feature that's still being developed. As mentioned in #267 we decided on the current restriction in yutakahirano/fetch-with-streams#53, but as mentioned there we could revisit it. If we want to do that let's do it through a new issue though and make the change for all streams. |
Updated the description. |
Okay, thanks for the background! |
…one Uint8Array ReadableStream., a=testonly Automatic update from web-platform-tests Add FetchEvent test that should reject none Uint8Array ReadableStream For whatwg/fetch#1199. -- wpt-commits: 6b817d451a291d554b4fb9d8b5650d8b2d12ecc9 wpt-pr: 28203
(See WHATWG Working Mode: Changes for more details.)
This change addresses the inconsistency discussed in #267 that a chunk type in stream body on uploading to the network is
limited only to
Uint8Array
but passing it to a service worker is not restricted.This PR changes later to limiting
Uint8Array
as well.Preview | Diff