From f6e173437e9f94cd4e713e556c6fc8ca68be8384 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Wed, 9 Feb 2011 17:47:33 +0100 Subject: 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. --- src/ajax/xhr.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ajax') diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index 1f136c343..fcea52c16 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -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) -- cgit v1.2.3