Continuing to map request headers using their name in uppercase for the index, but we now map to an object with an unmodified name and value: { name: "", value: "" }. This prevents overwriting of the user's supplied headers, which many applications parse with case sensitivity, because we no longer use the modified, uppercase index when building the request.

This commit is contained in:
Sam Bisbee 2011-04-15 16:36:43 -04:00
parent 35d9425969
commit a9a79ccc6e
2 changed files with 11 additions and 8 deletions

View file

@ -104,7 +104,7 @@ if ( jQuery.support.ajax ) {
// Need an extra try/catch for cross domain requests in Firefox 3
try {
for ( i in headers ) {
xhr.setRequestHeader( i, headers[ i ] );
xhr.setRequestHeader( headers[ i ].name, headers[ i ].value );
}
} catch( _ ) {}