Side navigation
#4624 closed bug (fixed)
Opened May 05, 2009 05:57AM UTC
Closed March 07, 2012 04:09PM UTC
Last modified March 13, 2012 04:25PM UTC
Charset in default ajaxSettings.contentType
Reported by: | dimonnot | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.7.2 |
Component: | ajax | Version: | 1.3.2 |
Keywords: | ajax, charset, needsreview | Cc: | |
Blocked by: | Blocking: |
Description
ajaxSettings.contentType must be "application/x-www-form-urlencoded; charset=UTF-8"
Attachments (0)
Change History (9)
Changed May 06, 2009 02:18AM UTC by comment:1
Changed June 11, 2010 03:03AM UTC by comment:2
resolution: | → worksforme |
---|---|
status: | new → closed |
The default charset is UTF-8 for all XHR posts, so I don't think any action is required.
Changed March 14, 2011 03:21PM UTC by comment:3
The default contentType of jquery doesn't mention the default charset.
In Firefox, the contentType is automatically updated with "''application/x-www-form-urlencoded; charset=UTF-8''", or in Google Chrome, the jquery default contentType is used, so "''application/x-www-form-urlencoded''" (look at the contentType in the request headers).
Although the default charset is UTF-8 for all XHR posts, why don't specify it to be cross-browser ?
Changed March 14, 2011 03:26PM UTC by comment:4
Sorry, you could test it here : http://jsfiddle.net/vinzweb/H2LdJ/5/
If you change the "Charset encoding" of your browser in ISO-8859-1, you don't see the charset used in the contentType. So you have to refer to the field "X-Requested-With" (XMLHttpRequest) to be sure you are in UTF-8.
Changed December 05, 2011 07:29PM UTC by comment:5
This should be fixed as I experienced real problems with the Chrome browser and a Tomcat server that uses ISO-8859-1 by default when the charset is not explicitly specified.
I'll open a new ticket pointing to this one since I can't reopen it here and no actual answer was given to why this was rejected.
Changed December 06, 2011 11:51AM UTC by comment:6
keywords: | ajax, charset → ajax, charset, needsreview |
---|---|
milestone: | 1.4 |
resolution: | worksforme |
status: | closed → reopened |
Changed March 07, 2012 04:09PM UTC by comment:8
resolution: | → fixed |
---|---|
status: | reopened → closed |
Fixes #4624... 3 years later, people!
Changeset: bd56456b1e886c7b03211212ac3c0a6a310b5cde
Changed March 07, 2012 04:10PM UTC by comment:9
milestone: | → 1.7.2 |
---|
Do you have a test case where this change is required? Also, are you asking that jQuery be changed to use that as the default content type?