Permalink
Browse files

Make sure xhr req header's value is String type

Summary:
In the `NetworkingModule.java`, `header.getString(1)` was
called, so the value must be String type.

FIX #10198
Closes #10222

Differential Revision: D4080319

Pulled By: lacker

fbshipit-source-id: 85234a2bbf90e5b9e0e65ceadbfabb330b2d1322
  • Loading branch information...
1 parent c9d8e23 commit f9e36a08a8de53bf9618776cee9916496d73152e @leeight leeight committed with Facebook Github Bot Oct 26, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 Libraries/Network/XMLHttpRequest.js
@@ -352,7 +352,7 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) {
if (this.readyState !== this.OPENED) {
throw new Error('Request has not been opened');
}
- this._headers[header.toLowerCase()] = value;
+ this._headers[header.toLowerCase()] = String(value);
}
/**

0 comments on commit f9e36a0

Please sign in to comment.