Skip to content

Commit

Permalink
Fix incorrect lowercase response headers set for XHR responses
Browse files Browse the repository at this point in the history
Summary:
Trivial change to fix the lowercase response headers set for XHR responses.

What would happen is the first iterated header wouldn't be part of `_lowerCaseResponseHeaders`.
Also it would mutate the original `responseHeaders` object, mixing lowercase headers with the original values.
Closes #1876
Github Author: Jean Regisser <jean.regisser@gmail.com>
  • Loading branch information
jeanregisser committed Jul 7, 2015
1 parent 566ca9e commit 5c01b1e
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 @@ -154,7 +154,7 @@ class XMLHttpRequestBase {
this._lowerCaseResponseHeaders =
Object.keys(headers).reduce((lcaseHeaders, headerName) => {
lcaseHeaders[headerName.toLowerCase()] = headers[headerName];
return headers;
return lcaseHeaders;
}, {});
}

Expand Down

0 comments on commit 5c01b1e

Please sign in to comment.