Skip to main content

Bug Tracker

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 rwaldron comment:1

owner: → wuyuntao
status: newpending

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!

Changed February 11, 2011 04:23AM UTC by rwaldron comment:2

component: unfiledajax
priority: undecidedlow

Changed February 11, 2011 06:05AM UTC by jaubourg comment:3

milestone: 1.next1.5.1
owner: wuyuntaojaubourg
status: pendingassigned

Changed February 11, 2011 06:07AM UTC by jaubourg comment:4

resolution: → fixed
status: assignedclosed

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 jaubourg comment:5

wuyuntao, can you confirm this fixes the issue?