Side navigation
#8245 closed bug (fixed)
Opened February 11, 2011 04:21AM UTC
Closed February 11, 2011 06:07AM UTC
Last modified February 11, 2011 06:08AM UTC
AJAX Calls not set the "Accept" header properly under Android browser
Reported by: | wuyuntao | Owned by: | jaubourg |
---|---|---|---|
Priority: | low | Milestone: | 1.5.1 |
Component: | ajax | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Try using $.ajax({ ... dataType: 'json', ... }) under Android Browser (Motorola Milestone, both eclair and froyo).
It adds "accept: application/json, ..." header to request while browser sends anothor "Accept: text/xml, ..." header which overrides the previous one.
Can be fixed by:
requestHeaders[ "Accept" ] = ...
Attachments (0)
Change History (5)
Changed February 11, 2011 04:23AM UTC by comment:1
owner: | → wuyuntao |
---|---|
status: | new → pending |
Changed February 11, 2011 04:23AM UTC by comment:2
component: | unfiled → ajax |
---|---|
priority: | undecided → low |
Changed February 11, 2011 06:05AM UTC by comment:3
milestone: | 1.next → 1.5.1 |
---|---|
owner: | wuyuntao → jaubourg |
status: | pending → assigned |
Changed February 11, 2011 06:07AM UTC by comment:4
resolution: | → fixed |
---|---|
status: | assigned → closed |
Fixes #8245. Ajax now ensures header names are capitalized so that non-compliant xhr implementations don't override them.
Changeset: f2e0ae1a3932d6089853e8c0eed6ecb446610c00
Changed February 11, 2011 06:08AM UTC by comment:5
wuyuntao, can you confirm this fixes the issue?
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!
Additionally, test against the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!