[Webkit-unassigned] [Bug 137865] New: XMLHttpRequest using wrong default content-type, forcing CORS preflight

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 19 12:19:25 PDT 2014


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

            Bug ID: 137865
           Summary: XMLHttpRequest using wrong default content-type,
                    forcing CORS preflight
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Macintosh Intel
                OS: Other
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: chrisjshull at gmail.com

Per http://www.w3.org/TR/XMLHttpRequest2/#the-send-method
When sending a string:
Let mime type be "text/plain;charset=UTF-8".

Now try this with an HTTP proxy/monitor and Safari 8.0:
var xhr = new XMLHttpRequest();
var url = "http://www.corsproxy.com/en.wikipedia.org/wiki/Http?" + Date.now();
xhr.open("POST", url, true);
xhr.send("test");

Observed:
An OPTIONS preflight.
Because the Content-Type in the POST request has been set to application/xml.

Expected:
No OPTIONS preflight.
Content-Type in the POST request to be text/plain;charset=UTF-8.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141019/77b75e81/attachment-0002.html>


More information about the webkit-unassigned mailing list