Side navigation
#12608 closed bug (invalid)
Opened September 25, 2012 11:34PM UTC
Closed October 11, 2012 08:54AM UTC
jQuery.ajax: contentType messing w\\ HTTP POST Request with FireFox and Chrome, but not IE9
Reported by: | jeff00seattle | Owned by: | jeff00seattle |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.2 |
Keywords: | Cc: | jaubourg | |
Blocked by: | Blocking: |
Description
Hi
First, the full discussion and details (code and Fiddler 2 debugger snapshots) of this bug was initially discussed within recent "Using jQuery" forum submittal:
http://forum.jquery.com/topic/jquery-ajax-is-attribute-contenttype-deprecated
I think I discovered a bug in jQuery.ajax() when assigning a value other than default to property contentType, or it is a bug in Mozilla and Chrome.
Reference: http://api.jquery.com/jQuery.ajax/ , property contentType , Default: 'application/x-www-form-urlencoded; charset=UTF-8'
Assigning '''contentType: 'application/x-www-form-urlencoded; charset=UTF-8', this works fine with three browsers tested: IE9, Mozilla FireFox, and Chrome (all the latest stable versions).
However, assigning contentType: 'application/json; charset=UTF-8'''', this messes up the request body when run within Mozilla FireFox and Chrome and fails, but this same change runs perfectly fine in IE9.
Details of the Requests bodies are at the bottom of the aforementioned forum submittal.
Thank you for looking into this problem.
Jeff in Seattle
Attachments (0)
Change History (2)
Changed September 27, 2012 12:26AM UTC by comment:1
cc: | → jaubourg |
---|---|
owner: | → jeff00seattle |
status: | new → pending |
Changed October 11, 2012 08:54AM UTC by comment:2
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Based on the forum thread, it looks like the browser is doing a preflight because the content-type you provided is not the normal form-url-encoded value. Can you provide a complete test case? Is this a request to the same domain?