Skip to content

Commit

Permalink
Fixes jquery#4624... 3 years later, people!
Browse files Browse the repository at this point in the history
  • Loading branch information
jaubourg committed Mar 7, 2012
1 parent d3fad51 commit bd56456
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ajax.js
Expand Up @@ -315,7 +315,7 @@ jQuery.extend({
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
global: true,
type: "GET",
contentType: "application/x-www-form-urlencoded",
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
processData: true,
async: true,
/*
Expand Down
3 changes: 1 addition & 2 deletions src/ajax/jsonp.js
Expand Up @@ -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 ) ||
Expand Down

0 comments on commit bd56456

Please sign in to comment.