git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes #8146 by introducing the xhrFields option with is a map of fieldName/fieldValue...
[jquery.git]
/
src
/
ajax
/
xhr.js
diff --git
a/src/ajax/xhr.js
b/src/ajax/xhr.js
index
c0368b9
..
3acdc66
100644
(file)
--- 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(),
// 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)
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)