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

fetch streaming upload #663

Closed
yutakahirano opened this issue Jul 5, 2022 · 6 comments
Closed

fetch streaming upload #663

yutakahirano opened this issue Jul 5, 2022 · 6 comments
Labels
position: positive venue: WHATWG Specifications in a WHATWG Workstream

Comments

@yutakahirano
Copy link

yutakahirano commented Jul 5, 2022

Request for Mozilla Position on fetch streaming upload

  • Specification Title: Fetch streaming upload
  • Specification or proposal URL: https://fetch.spec.whatwg.org/
  • Caniuse.com URL (optional): N/A
  • Bugzilla URL (optional): N/A
  • Mozillians who can provide input (optional): @annevk (whle he is leaving Mozilla), @ddragana

Other information

Discussions:

TAG review:

Explainer:

@yutakahirano
Copy link
Author

We talked about the feature at TPAC 2019 and at that time Mozilla was interested in the feature. note

@bgrins
Copy link
Member

bgrins commented Jul 12, 2022

I chatted with some folks about this. We're positive on the concept & use cases. There were two concerns raised which I wanted to share and give space for discussion if necessary:

  1. Potential for observable ServiceWorker lifetime changes (as per @asutherland). We think browsers should not keep alive a ServiceWorker due to an ongoing stream and since the SW lifetime isn't specced there's a risk for interop bugs. @yutakahirano do you know if this is the case in the Chrome implementation?
  2. There's likely some implementation complexity for Gecko (as per @mystor), which doesn't affect our position on the standard but I'll share it for context:

Because our existing code depends on all of the upload stream being available and rewindable, we actually aggressively convert the stream into a buffered one so we can replay it within the http channel

@yutakahirano
Copy link
Author

Potential for observable ServiceWorker lifetime changes (as per @asutherland). We think browsers should not keep alive a ServiceWorker due to an ongoing stream and since the SW lifetime isn't specced there's a risk for interop bugs. @yutakahirano do you know if this is the case in the Chrome implementation?

When the script clones a Request and then kicks off the network fallback, we need to keep the service worker alive until we read the request body.

See 'Running clone() in the service worker does not prevent network fallback.' which uses "handleConeAndIgnore" for the test case.

@valenting
Copy link

Considering the last comment and the fact that we are actually going to implement this, I think we can close this issue as Positive ➕.

@martinthomson
Copy link
Member

➕ it is. Thanks all. No dashboard entry for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
position: positive venue: WHATWG Specifications in a WHATWG Workstream
Projects
None yet
Development

No branches or pull requests

6 participants