Bug 46149

Summary: XMLHttpRequest: send(data) does not set Content-Type header correctly when data is DOMString or Document
Product: WebKit Reporter: Jian Li <jianli>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, dimich, fishd, jianli, levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   

Jian Li
Reported 2010-09-20 17:54:59 PDT
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
Attachments
Alexey Proskuryakov
Comment 1 2010-09-20 18:31:12 PDT
*** This bug has been marked as a duplicate of bug 11049 ***
Note You need to log in before you can comment on or make changes to this bug.