RESOLVED FIXED 12099
XMLHttpRequest shouldn't honor a charset specified via setRequestHeader
https://bugs.webkit.org/show_bug.cgi?id=12099
Summary XMLHttpRequest shouldn't honor a charset specified via setRequestHeader
Alexey Proskuryakov
Reported 2007-01-03 08:56:01 PST
Overriding Content-Type as req.setRequestHeader("Content-Type", "text/plain; charset='some-encoding'"); req.send(aString); makes the sent string be encoded as "some-encoding" in WebKit, but not in MSIE or Firefox, where it's always sent as UTF-8. The XMLHttpRequest spec draft mandates IE/Firefox behavior, of course. Additionally, looking at Content-Type further complicates the choice of encoding for documents, see bug 11695.
Attachments
proposed patch (4.50 KB, patch)
2007-01-08 02:50 PST, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2007-01-08 02:50:19 PST
Created attachment 12298 [details] proposed patch
Darin Adler
Comment 2 2007-01-08 10:12:10 PST
Comment on attachment 12298 [details] proposed patch r=me
Alexey Proskuryakov
Comment 3 2007-01-08 12:06:13 PST
Committed revision 18675.
Note You need to log in before you can comment on or make changes to this bug.