[Webkit-unassigned] [Bug 46149] New: XMLHttpRequest: send(data) does not set Content-Type header correctly when data is DOMString or Document

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 20 17:54:59 PDT 2010


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

           Summary: XMLHttpRequest: send(data) does not set Content-Type
                    header correctly when data is DOMString or Document
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jianli at chromium.org
                CC: ap at webkit.org, fishd at chromium.org,
                    dimich at chromium.org, levin at chromium.org,
                    jianli at chromium.org


XMLHttpRequest: send(data) does not set correct Content-Type header correctly when data is DOMString or Document.

Per the XHR spec:
  If data is a Document
  Let encoding be the preferred MIME name of the character encoding of data. If encoding is UTF-16 change it to UTF-8.
  Let mime type be "application/xml" or "text/html" if Document is flagged as HTML document, followed by ";charset=", followed by encoding.

  If data is a DOMString
  Let encoding be UTF-8.
  Let mime type be "text/plain;charset=UTF-8".

Test: http://tc.labs.opera.com/apis/XMLHttpRequest/send-content-type-string.htm

-- 
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