New issue
Advanced search Search tips

Issue 747787 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Beacon API not sending the correct Content Type when BodyInit is URLSearchParams

Project Member Reported by strobe@chromium.org, Jul 24 2017

Issue description

Chrome Version: 62.0.3164.0 (Official Build) canary (64-bit)
OS: OSX

What steps will reproduce the problem?
(1) Navigate to, for example, www.youtube.com
(2) From the console:
u = new URLSearchParams(); 
u.append('foo', 'bar'); 
navigator.sendBeacon('https://s.youtube.com/api/stats/qoe?c=YES', u);
(3) Check network inspector

What is the expected result?
The request goes out with type `application/x-www-form-urlencoded;charset=UTF-8`
https://fetch.spec.whatwg.org/#bodyinit

What happens instead?
The request goes out with content type `text/plain;charset=UTF-8`

See also https://bugs.chromium.org/p/chromium/issues/detail?id=466038
 
Components: -Blink>Loader Blink>Network
Status: Available (was: Untriaged)
NavigatorBeacon.idl should be fixed to accept URLSearchParams as specified in the Beacon spec, and then NavigatorBeacon.cpp must be fixed to serialize the input correctly.
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 24

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment