
Does firefox add charset=utf-8 to the ContentType request header
Hi, I've noticed whilst developing for an ATG application that AJAX post requests from Firefox seem to have charset=utf-8 appended to the end of the ContentType request header. This is having an effect on requests that contain UTF-8 characters (strangely!). (For info, the header is ContentType: application/x-www-form-urlencoded; charset=UTF-8).
For example, issuing a request that contains the text 용산구 서초2동 1308-25 and using Chrome, the text is stored in the correct format in the DB. However, in FF4 (and I think all 3.x versions) the same text is garbled in the DB. Now, I don't know if the problem is Firefox or perhaps the JBOSS server we use (4.3 EAP) or perhaps the ATG application itself but I'll be asking the same in those forums too. If I use a tool like WebScarab to intercept the request, I can remove the charset from the ContentType and the text is saved correctly.
Other info: XHR request sent using the DOJO 1.3 library.
Just wondering if it is indeed Firefox adding the charset parameter and if there is a programmatic way to prevent it.
All Replies (3)
A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.
Thanks very much, I wasn't aware of that forum - I'll go investigate.
Matt
Instead of sending your serialized data through the data argument, try sending it over the url argument, appended to the target url.
Modified