[Webkit-unassigned] [Bug 108148] New: Wrong default Content-Type set in XMLHttpRequest.send(String)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 28 21:23:41 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=108148

           Summary: Wrong default Content-Type set in
                    XMLHttpRequest.send(String)
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: XML
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: costan at gmail.com


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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list