diff options
author | jaubourg <j@ubourg.net> | 2011-01-20 19:40:51 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2011-01-20 19:40:51 +0100 |
commit | 3dbd600e1961d9ab5296afbf2b3eb0852ad176e0 (patch) | |
tree | 52735bc1c4e154d6524aa2cdeb47775e2ec30c9d /src/ajax | |
parent | 8ad2b31ff65ee07be02fb8976ea3b0f4105518b5 (diff) | |
download | jquery-3dbd600e1961d9ab5296afbf2b3eb0852ad176e0.tar.gz jquery-3dbd600e1961d9ab5296afbf2b3eb0852ad176e0.zip |
Moves determineResponse logic into main ajax callback. Puts responseXXX fields definitions into ajaxSettings.
Diffstat (limited to 'src/ajax')
-rw-r--r-- | src/ajax/xhr.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index 652480ba5..7a4da2ddb 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -149,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; @@ -184,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); } } }; |