Skip to content
Permalink
Browse files

Fixes #8146. Custom fields in xhrFields are now set after the XMLHttp…

…Request object has been opened.
  • Loading branch information
jaubourg committed Feb 3, 2011
1 parent d77a2a2 commit 823eecab9073b43a283a2500e9e43c3a06cc2495
Showing with 7 additions and 7 deletions.
  1. +7 −7 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)

0 comments on commit 823eeca

Please sign in to comment.
You can’t perform that action at this time.