Closed Bug 842701 Opened 11 years ago Closed 7 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bruant.d, Unassigned)

References

()

Details

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
This has long since been fixed (the STR now work expected, with the header being sent as "app/lication").
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.