RESOLVED DUPLICATE of bug 99973 108148
Wrong default Content-Type set in XMLHttpRequest.send(String)
https://bugs.webkit.org/show_bug.cgi?id=108148
Summary Wrong default Content-Type set in XMLHttpRequest.send(String)
Victor Costan
Reported 2013-01-28 21:25:40 PST
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.27 (KHTML, like Gecko) Chrome/26.0.1386.0 Safari/537.27 Steps to reproduce the problem: 1. Run the following JavaScript xhr = new XMLHttpRequest xhr.open('POST', window.location.href, false); xhr.send('Hello world!') 2. Open the developer tools and check the Content-Type of the request. What is the expected behavior? The Content-Type should be "text/plain;charset=UTF-8". See step 4, subsection "string" in http://www.w3.org/TR/XMLHttpRequest/#the-send()-method What went wrong? Chrome seems to use "application/xml" as the default Content-Type when the XMLHttpRequest#send() argument is a String. Did this work before? No Chrome version: 26.0.1386.0 Channel: dev OS Version: Fedora x84_64 Firefox sends the "text/plain; charset=UTF-8" Content-Type, which is almost correct. I am working on a WebKit patch for this issue. I have the code patch, and I'm currently working on a layout test and figuring out the contribution guide. This bug appears to address a subset of 11049, but the patch attached there does not seem to cover the case that my patch addresses.
Attachments
Victor Costan
Comment 1 2013-01-28 21:26:48 PST
This bug is also posted in the Chromium tracker: http://crbug.com/172802
Alexey Proskuryakov
Comment 2 2013-01-28 22:59:26 PST
*** This bug has been marked as a duplicate of bug 99973 ***
Note You need to log in before you can comment on or make changes to this bug.