Closed Bug 1157187 Opened 9 years ago Closed 9 years ago

[ServiceWorkers] cannot read request body on post request

Categories

(Core :: DOM: Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1134325

People

(Reporter: arcturus, Unassigned)

References

Details

Attachments

(2 files)

Attached file 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:"
Attached file sw.js
Hei baku, added a test case to try the behavior.
Flags: needinfo?(amarchesini)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(amarchesini)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: