Fixes #8219. Introduces the mimeType option to override content-type header in conversion (and in native xhr when possible). Adds companion overrideMimeType method on jqXHR object (it simply sets the option). Unit test added.

This commit is contained in:
jaubourg 2011-02-09 17:47:33 +01:00
parent 806d9ce811
commit f6e173437e
3 changed files with 42 additions and 1 deletions

View file

@ -87,6 +87,11 @@ if ( jQuery.support.ajax ) {
}
}
// Override mime type if needed
if ( s.mimeType && xhr.overrideMimeType ) {
xhr.overrideMimeType( s.mimeType );
}
// Requested-With header
// Not set for crossDomain requests with no content
// (see why at http://trac.dojotoolkit.org/ticket/9486)