X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=7760593d384a36176a007442f27dcbb49ab35349;hb=f52c4a3d5fb69f143d90f9a032e2a004c36ccae3;hp=adae6aec7493b52bcd35a40b78d129affdfce38c;hpb=fe80b5af45049d1c8d10682eb1075f838d52a045;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index adae6ae..7760593 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -370,7 +370,7 @@ jQuery.extend({ // Wait for a response to come back var onreadystatechange = function(isTimeout){ // The request was aborted, clear the interval and decrement jQuery.active - if ( xhr.readyState === 0 ) { + if ( !xhr || xhr.readyState === 0 ) { if ( ival ) { // clear poll interval clearInterval( ival ); @@ -451,7 +451,7 @@ jQuery.extend({ // Send the data try { - xhr.send( type === "POST" ? s.data : null ); + xhr.send( type === "POST" || type === "PUT" ? s.data : null ); } catch(e) { jQuery.handleError(s, xhr, null, e); }