Commit Graph

4 Commits

Author SHA1 Message Date
Ryan Pastorelle 8a74a9f7c3 Force `responseHeaders` to lower case to respect case-insensitivity
Summary:
`XMLHttpRequest.getResponseHeader` is case-insensitive, therefor the React-Native implementation needs to mimic this behavior as to not break libraries that are dependent on this.

There is a corresponding issue in `superagent` but this is the root cause (https://github.com/visionmedia/superagent/issues/636).
Closes https://github.com/facebook/react-native/pull/1138
Github Author: Ryan Pastorelle <rpastorelle@yahoo.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-05 14:09:40 -08:00
Andy Street eafe93096c [react_native] JS files from D2012956: [react_native] Never return null from XHR.getAllResponseHeaders if request has completed 2015-04-22 09:05:42 -08:00
Josh Zana 368e507b38 Implement XmlHttpRequestBase#getAllResponseHeaders and getResponseHeader
Summary:
Used https://github.com/facebook/react-native/pull/382 as inspiration
but modified to return null instead of undefined as per the spec at
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

This unblocks use of Dropbox.js within a react-native app, as well
as any other libraries that make use of these methods in XHR usage.

Closes https://github.com/facebook/react-native/issues/872
Closes https://github.com/facebook/react-native/pull/892
Github Author: Josh Zana <joshzana@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-21 16:45:32 -08:00
Olivia Bishop 40d71e6c5b JS files from D1936817: Add to XMLHttpRequest android and share code with ios 2015-03-24 14:25:20 -08:00