X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Fajax%2Fxhr.js;h=4adf8eb2ad0ceea7fa2ddfeabbd9c4b13b0a388a;hp=d4c291fcbb17f21b9e03f2fa5c8fbe14c2979d6f;hb=823eecab9073b43a283a2500e9e43c3a06cc2495;hpb=d77a2a2274d34033da8609a26c9cc1f2bd14c879 diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index d4c291f..4adf8eb 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -85,13 +85,6 @@ if ( jQuery.support.ajax ) { handle, i; - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - // Open the socket // Passing null username, generates a login popup on Opera (#2865) if ( s.username ) { @@ -100,6 +93,13 @@ if ( jQuery.support.ajax ) { xhr.open( s.type, s.url, s.async ); } + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + // Requested-With header // Not set for crossDomain requests with no content // (see why at http://trac.dojotoolkit.org/ticket/9486)