Bug Tracker

Modify

Ticket #7881 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Make compatible with XHR 2

Reported by: codler Owned by: codler
Priority: low Milestone: 1.6
Component: ajax Version: git
Keywords: Cc:
Blocking: Blocked by:

Description

Don't force sending the header content-type when doing a ajax call. Sending content-type in header makes it not possible to upload files in XHR 2 because it overwrites this 'multipart/form-data; boundary=----XXX' what would have been automatically sent by the browser.

Change History

comment:1 Changed 3 years ago by rwaldron

  • Owner set to codler
  • 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 latest jQuery release and the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!

Keep in mind, the jQuery 0 Git version includes the latest Ajax re-write

comment:2 Changed 3 years ago by codler

  • Status changed from pending to new

It is still the same in the latest jQuery 0 GIT version.

Here is the test  http://jsfiddle.net/sf3Pb/

comment:3 Changed 3 years ago by snover

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to ajax

Force strict false value in contentType to never set Content-Type header.

Last edited 3 years ago by snover (previous) (diff)

comment:4 Changed 3 years ago by jaubourg

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

Fixes #7881. Setting contentType to false will prevent the Content-Type header from being sent. Unit test added.

Changeset: 69497c3fd7ff560be0e47b4c65076915cca756bc

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.