X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Fajax.js;h=90dc350fc922b6cf0e4dfab15da4d1e53a213ad2;hp=6ea61eb21da55d0324065cbbda375c6823ea1b78;hb=9759e9f6bb9b85a95e0254e6b7b2ed861aee8c84;hpb=238ac5a0aa25e7fb4fead7a56b92951817446127 diff --git a/src/ajax.js b/src/ajax.js index 6ea61eb..90dc350 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -209,7 +209,10 @@ jQuery.extend({ var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings), jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type); - s.url = s.url.replace( rhash, "" ); + // toString fixes people passing a window.location or + // document.location to $.ajax, which worked in 1.4.2 and + // earlier (bug #7531). It should be removed in 1.5. + s.url = ("" + s.url).replace( rhash, "" ); // Use original (not extended) context object if it was provided s.context = origSettings && origSettings.context != null ? origSettings.context : s; @@ -272,7 +275,7 @@ jQuery.extend({ }; } - if ( s.dataType === "script" && s.cache === null ) { + if ( s.dataType === "script" && s.cache === undefined ) { s.cache = false; }