-
Notifications
You must be signed in to change notification settings - Fork 320
Open
Description
What happens if:
- POST request with body.
- The service worker does not call
respondWith. - After 100ms (using
waitUntil) the service worker tries to read the body of the request.
It feels like the read should fail, since the body is used as part of making the default request.
Test – Both Firefox and Chrome allow the body to be read, as if it's a clone.
I'm not sure this behaviour is compatible with request body streams. Or, it isn't memory-friendly.
Also, what happens if:
- POST request with body.
- The service worker gets a lock on the request's stream, tries to read data.
- The service worker does not call
respondWith.
It feels like this should result in a network error, as the browser won't be able to read from the stream.
Test – Both Firefox and Chrome allow the body to be read in the service worker, and allow the default request to happen.
Again, I think this is problematic with request body streams.
Shall we try and change this?
Metadata
Metadata
Assignees
Labels
No labels