diff options
author | jaubourg <j@ubourg.net> | 2011-02-12 00:13:38 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2011-02-12 00:14:11 +0100 |
commit | ea3e10a49207f76957b5bd87095634882d5d374b (patch) | |
tree | 590fb2b9f3488eeadf219c701693c2cee167c51c /src/ajax/xhr.js | |
parent | 481d940e79f9d01e49218bf76575849158214e28 (diff) | |
download | jquery-ea3e10a49207f76957b5bd87095634882d5d374b.tar.gz jquery-ea3e10a49207f76957b5bd87095634882d5d374b.zip |
Minor changes to enforce JQuery Core Style Guidelines.
Diffstat (limited to 'src/ajax/xhr.js')
-rw-r--r-- | src/ajax/xhr.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index 9c8790aba..a6473dd87 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -26,7 +26,7 @@ function createStandardXHR() { function createActiveXHR() { try { - return new window.ActiveXObject("Microsoft.XMLHTTP"); + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); } catch( e ) {} } @@ -166,14 +166,16 @@ if ( jQuery.support.ajax ) { } // Filter status for non standard behaviors - status = - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - !status && s.isLocal && !s.crossDomain ? - ( responses.text ? 200 : 404 ) : - // IE - #1450: sometimes returns 1223 when it should be 204 - ( status === 1223 ? 204 : status ); + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } } } } catch( firefoxAccessException ) { |