]> source.dussan.org Git - jquery.git/commitdiff
Replaces jQuery.each loop for headers with a foreach loop.
authorjaubourg <j@ubourg.net>
Wed, 9 Feb 2011 16:50:45 +0000 (17:50 +0100)
committerjaubourg <j@ubourg.net>
Wed, 9 Feb 2011 16:50:45 +0000 (17:50 +0100)
src/ajax/xhr.js

index fcea52c16c6ecedf9b07d34fb22b2ba45a9b8430..f31fa70268ff5800a8880892ca82f64c85e79a6b 100644 (file)
@@ -102,9 +102,9 @@ if ( jQuery.support.ajax ) {
 
                                        // 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