Bug Tracker

Modify

Ticket #8245 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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" ] = ...

Change History

comment:1 Changed 3 years ago by rwaldron

  • Owner set to wuyuntao
  • Status changed from new to pending

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!

comment:2 Changed 3 years ago by rwaldron

  • Priority changed from undecided to low
  • Component changed from unfiled to ajax

comment:3 Changed 3 years ago by jaubourg

  • Owner changed from wuyuntao to jaubourg
  • Status changed from pending to assigned
  • Milestone changed from 1.next to 1.5.1

comment:4 Changed 3 years ago by jaubourg

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixes #8245. Ajax now ensures header names are capitalized so that non-compliant xhr implementations don't override them.

Changeset: f2e0ae1a3932d6089853e8c0eed6ecb446610c00

comment:5 Changed 3 years ago by jaubourg

wuyuntao, can you confirm this fixes the issue?

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.