WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 236837
236973
Missing content type header for requests with non-safe content type
https://bugs.webkit.org/show_bug.cgi?id=236973
Summary
Missing content type header for requests with non-safe content type
Kevin Twesten
Reported
2022-02-21 06:31:01 PST
When sending a request with a non-safe content type (e.g. a blob via sendBeacon), the "content-type" header is missing when it is fetched by a Service Worker. This happens for cross-origin requests as well as for same-origin requests. I implemented a simple test page that reproduces the issue here:
https://good-breeze-16.app.baqend.com/
The test page registers a simple Service Worker which listens to fetch requests, logs the seen request headers, and does the fetch. The test page also includes the following script tag that sends the beacon requests: <script> // Cross Origin var blob = new Blob([JSON.stringify({"weather":true})], { type: "application/json" }); navigator.sendBeacon('
https://dm-clone.app.baqend.com/v1/code/endpoint?type=beaconStrange
', blob); // Same origin var blob = new Blob([JSON.stringify({"weather":true})], { type: "application/json" }); navigator.sendBeacon('
https://good-breeze-16.app.baqend.com/v1/code/endpoint?type=beaconStrange
', blob); </script> Ways to reproduce: 1. Navigate to
https://good-breeze-16.app.baqend.com/
2. Open Service Workers view (Developer -> Service Workers) 3. Refresh the page 4. Check the request headers printed in the Service Worker console and see that the "content-type" header is missing for both beacon requests. Is there any fix for this issue?
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-23 15:39:23 PST
<
rdar://problem/89382511
>
youenn fablet
Comment 2
2022-03-10 05:13:09 PST
*** This bug has been marked as a duplicate of
bug 236837
***
youenn fablet
Comment 3
2022-03-10 05:13:35 PST
> Is there any fix for this issue?
Thanks for the report, this should be fixed now in ToT.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug