From 7069e4cd3f1228e0508988ecdee2afb3899aedfc Mon Sep 17 00:00:00 2001 From: Philipp von Weitershausen Date: Tue, 26 May 2015 08:12:59 -0700 Subject: [PATCH] XMLHttpRequest: ignore case for request headers Summary: HTTP headers are case-insensitive, so we should treat them that way when they're being set on `XMLHttpRequest`. Closes https://github.com/facebook/react-native/pull/1381 Github Author: Philipp von Weitershausen Test Plan: Imported from GitHub, without a `Test Plan:` line. --- Libraries/Network/XMLHttpRequestBase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Network/XMLHttpRequestBase.js b/Libraries/Network/XMLHttpRequestBase.js index 83e44073e31297..3570e4bf29ef36 100644 --- a/Libraries/Network/XMLHttpRequestBase.js +++ b/Libraries/Network/XMLHttpRequestBase.js @@ -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 {