diff options
author | jaubourg <j@ubourg.net> | 2012-03-07 17:08:59 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2012-03-07 17:08:59 +0100 |
commit | bd56456b1e886c7b03211212ac3c0a6a310b5cde (patch) | |
tree | 27a9a3fa316fe01187a1a46511dcd5116d5b593b /src/ajax/jsonp.js | |
parent | d3fad51cad1f71bd20beba81b51552295721a5a5 (diff) | |
download | jquery-bd56456b1e886c7b03211212ac3c0a6a310b5cde.tar.gz jquery-bd56456b1e886c7b03211212ac3c0a6a310b5cde.zip |
Fixes #4624... 3 years later, people!
Diffstat (limited to 'src/ajax/jsonp.js')
-rw-r--r-- | src/ajax/jsonp.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ajax/jsonp.js b/src/ajax/jsonp.js index 6b0f95d5b..e1f2b5314 100644 --- a/src/ajax/jsonp.js +++ b/src/ajax/jsonp.js @@ -14,8 +14,7 @@ jQuery.ajaxSetup({ // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - var inspectData = s.contentType === "application/x-www-form-urlencoded" && - ( typeof s.data === "string" ); + var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType ); if ( s.dataTypes[ 0 ] === "jsonp" || s.jsonp !== false && ( jsre.test( s.url ) || |