X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax%2Fxhr.js;h=7a4da2ddb5fc4a685d94372d2c97194f57d9868f;hb=3dbd600e1961d9ab5296afbf2b3eb0852ad176e0;hp=cd9838c3b538de4e066fc56293fa9cd17bf0dc58;hpb=ef86694ada757e5bc14227f8e5cc7d9d3a771da2;p=jquery.git diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index cd9838c..7a4da2d 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -128,7 +128,6 @@ if ( jQuery.support.ajax ) { callback = 0; // Do not keep as active anymore - // and store back into pool if (handle) { xhr.onreadystatechange = jQuery.noop; delete xhrs[ handle ]; @@ -150,6 +149,12 @@ if ( jQuery.support.ajax ) { responses = {}, xml = xhr.responseXML; + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + responses.text = xhr.responseText; + try { // Firefox throws an exception when accessing statusText for faulty cross-domain requests statusText = xhr.statusText; @@ -185,15 +190,8 @@ if ( jQuery.support.ajax ) { status ); - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - responses.text = xhr.responseText; - // Call complete - complete(status,statusText,s.determineResponse( responses, - xhr.getResponseHeader( "content-type" ) ),responseHeaders); + complete(status,statusText,responses,responseHeaders); } } };