If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Don't add a charset to author-specified Content-Type in XMLHttpRequest

NEW
Unassigned

Status

()

Core
DOM
5 years ago
5 years ago

People

(Reporter: David Bruant, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

5 years ago
Try on any page (with scratchpad):

var xhr = new XMLHttpRequest();
xhr.open('POST', '.')
xhr.setRequestHeader('Content-Type', "app/lication");
xhr.send('yo');

The WebConsole informs us that Content-Type header actually sent is "app/lication; charset=UTF-8"
It seems to be a Firefox violation of the XHR spec. Chrome seems to follow the spec, so that behavior looks web-compatible.

Relevant discussion thread starting at http://lists.w3.org/Archives/Public/public-webapps/2013JanMar/0479.html
(Reporter)

Updated

5 years ago
You need to log in before you can comment on or make changes to this bug.