Skip to content

Commit

Permalink
XMLHttpRequest: ignore case for request headers
Browse files Browse the repository at this point in the history
Summary:
HTTP headers are case-insensitive, so we should treat them that way when they're being set on `XMLHttpRequest`.
Closes #1381
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
  • Loading branch information
philikon committed May 26, 2015
1 parent b7c669a commit 7069e4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Network/XMLHttpRequestBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class XMLHttpRequestBase {
}

setRequestHeader(header: string, value: any): void {
this._headers[header] = value;
this._headers[header.toLowerCase()] = value;
}

open(method: string, url: string, async: ?boolean): void {
Expand Down

1 comment on commit 7069e4c

@Shobson-three29
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this commit actually fix? it definitely caused issues. there are many 3rd party api servers that have case sensitive header requirements.

Please sign in to comment.