+ // Construct response list
+ if ( xml && xml.documentElement /* #4958 */ ) {
+ responses.xml = xml;
+ }
+ responses.text = xhr.responseText;
+
+ // Firefox throws an exception when accessing
+ // statusText for faulty cross-domain requests
+ try {
+ statusText = xhr.statusText;
+ } catch( e ) {
+ // We normalize with Webkit giving an empty statusText
+ statusText = "";
+ }
+
+ // Filter status for non standard behaviors
+
+ // IE - #1450: sometimes returns 1223 when it should be 204
+ if ( status === 1223 ) {
+ status = 204;
+ // Status 0 encompasses several cases
+ } else if ( !status ) {
+ // Cross-domain
+ if ( s.crossDomain ) {
+ if ( !s.statusText ) {
+ // FF, Webkit (other?): There is no status text for errors
+ // 302 is the most generic cross-domain status code
+ // for errors, could be anything really (even a real 0)
+ status = 302;
+ }
+ // All same-domain: for local files, 0 is a success
+ } else if( protocolIsLocal ) {
+ status = 200;
+ // Opera: this notifies success for all requests
+ // (verified in 11.01). Patch welcome.
+ }
+ // Opera - #6060: sets status as 0 for 304
+ // Patch welcome.
+ }