X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=9e30eef1e582d5564c3527a3449b18f4f8fab0bb;hb=28a1f022233585cf40ae727d7d8334665a495e61;hp=d02d33135a4e38804bb6284308e5ff858373fdc5;hpb=d81dfbcccf07aa63c6bf5beb10a2d37207d9e340;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index d02d331..9e30eef 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -143,13 +143,15 @@ jQuery.extend({ url: location.href, global: true, type: "GET", - timeout: 0, contentType: "application/x-www-form-urlencoded", processData: true, async: true, + /* + timeout: 0, data: null, username: null, password: null, + */ // Create the request object; Microsoft failed to properly // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available // This function can be overriden by calling jQuery.ajaxSetup @@ -459,8 +461,7 @@ jQuery.extend({ try { // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 return !xhr.status && location.protocol == "file:" || - ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223 || - jQuery.browser.safari && xhr.status === undefined; + ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223; } catch(e){} return false; }, @@ -471,8 +472,7 @@ jQuery.extend({ var xhrRes = xhr.getResponseHeader("Last-Modified"); // Firefox always returns 200. check Last-Modified date - return xhr.status == 304 || xhrRes == jQuery.lastModified[url] || - jQuery.browser.safari && xhr.status === undefined; + return xhr.status == 304 || xhrRes == jQuery.lastModified[url]; } catch(e){} return false; }, @@ -499,7 +499,7 @@ jQuery.extend({ // Get the JavaScript object, if JSON is used. if ( type == "json" ) - data = eval("(" + data + ")"); + data = window["eval"]("(" + data + ")"); } return data;