X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax%2Fxhr.js;h=3acdc66a667c248e565a239ae837e418935f2953;hb=5ef7ddc4c55f49cb7767bba99975f2c7ea5422d9;hp=c0368b95786d85d34b1d7d853af31a3b07376a40;hpb=b90369e8cb2b6f3cc0afa34d815958ff0b605874;p=jquery.git diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index c0368b9..3acdc66 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -82,7 +82,15 @@ if ( jQuery.support.ajax ) { // Get a new xhr var xhr = s.xhr(), - handle; + 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)