[ServiceWorkers] cannot read request body on post request

RESOLVED DUPLICATE of bug 1134325

Status

()

Core
DOM: Workers
RESOLVED DUPLICATE of bug 1134325
3 years ago
3 years ago

People

(Reporter: arcturus, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Created attachment 8595907 [details]
sw.html

Cannot read the payload from a post request (didn't try with PUT also)

When trying to consume the body of the request with .text() we get an empty string.

STR:
With the attached files as use case.
1. Click on the 'register' button to perform the sw registration (this will reload the same page too)
2. Click on perform a post with payload

Expected:
This service worker will return the text sent via post, so you should get a text saying: "Response is: This is supposed to be my content"

Result:
The sw is not able to read the request.text() from the original request, and reads an empty string, so we could see on the screen: "Response is:"
Created attachment 8595908 [details]
sw.js
Hei baku, added a test case to try the behavior.
Blocks: 1153312
Flags: needinfo?(amarchesini)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1134325
Flags: needinfo?(amarchesini)
You need to log in before you can comment on or make changes to this bug.