git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaces jQuery.each loop for headers with a foreach loop.
[jquery.git]
/
src
/
ajax
/
xhr.js
diff --git
a/src/ajax/xhr.js
b/src/ajax/xhr.js
index
1f136c3
..
f31fa70
100644
(file)
--- a/
src/ajax/xhr.js
+++ b/
src/ajax/xhr.js
@@
-87,6
+87,11
@@
if ( jQuery.support.ajax ) {
}
}
}
}
+ // Override mime type if needed
+ if ( s.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( s.mimeType );
+ }
+
// Requested-With header
// Not set for crossDomain requests with no content
// (see why at http://trac.dojotoolkit.org/ticket/9486)
// Requested-With header
// Not set for crossDomain requests with no content
// (see why at http://trac.dojotoolkit.org/ticket/9486)
@@
-97,9
+102,9
@@
if ( jQuery.support.ajax ) {
// Need an extra try/catch for cross domain requests in Firefox 3
try {
// Need an extra try/catch for cross domain requests in Firefox 3
try {
- jQuery.each( headers, function( key, value ) {
- xhr.setRequestHeader( key, value );
- } );
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
} catch( _ ) {}
// Do send the request
} catch( _ ) {}
// Do send the request