#4624 closed bug (fixed)
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"
Change History (9)
comment:1 Changed 14 years ago by
comment:2 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
The default charset is UTF-8 for all XHR posts, so I don't think any action is required.
comment:3 Changed 12 years ago by
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 ?
comment:4 Changed 12 years ago by
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.
comment:5 Changed 11 years ago by
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.
comment:6 Changed 11 years ago by
Keywords: | needsreview added |
---|---|
Milestone: | 1.4 |
Resolution: | worksforme |
Status: | closed → reopened |
comment:8 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixes #4624... 3 years later, people!
Changeset: bd56456b1e886c7b03211212ac3c0a6a310b5cde
comment:9 Changed 11 years ago by
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?