react-native/Libraries
Howard Yeh 192ab663b7 Fix 302 ImageLoader caching problem on iOS
Summary:
+ Fixes https://github.com/facebook/react-native/issues/5616
+ Bug RNPlay Demo: https://rnplay.org/apps/Eg2goQ

Test demo loads a Tumblr avatar image using a URL that 301 to a CDN. Try to edit and save the file to trigger image reloads.

The 302 image request succeeds the first time:

<img width="318" alt="screen shot 2016-04-27 at 9 37 03 am" src="https://cloud.githubusercontent.com/assets/50120/14860038/b2c04e8a-0c5b-11e6-9edf-78309048368b.png">

But it fails for subsequent loads. You should see:

<img width="307" alt="screen shot 2016-04-27 at 9 37 22 am" src="https://cloud.githubusercontent.com/assets/50120/14860048/b756e170-0c5b-11e6-9031-8f3cca8f2994.png">

+ The first image is a 302, only succeeds to load the first time.
+ The second image in the column adds a nonce as request parameter to render caching ineffective (but still a 302), and the problem doesn't occur.
+ The last image is the canonical url location (200).

Although NSURLSession hand
Closes https://github.com/facebook/react-native/pull/7262

Differential Revision: D3231702

Pulled By: javache

fb-gh-sync-id: 364fcf9819188c63310768411d49e6431b2a01d3
fbshipit-source-id: 364fcf9819188c63310768411d49e6431b2a01d3
2016-04-27 14:40:30 -07:00
..
ART Check if either array is null before diffing 2016-04-25 13:28:31 -07:00
ActionSheetIOS CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
AdSupport
Animated Support for Animated.interpolate 2016-04-23 02:37:28 -07:00
AppRegistry Fix some warnings. 2016-04-20 20:45:22 -07:00
AppState Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
AppStateIOS Updating AppState to support the inactive state. 2016-03-10 08:30:24 -08:00
BatchedBridge Make polyfills and globals lazy 2016-04-27 09:57:20 -07:00
BugReporting refactor BugReporting to use RCTDeviceEventEmitter 2016-04-22 11:24:40 -07:00
CameraRoll fix warning about async CameraRoll.getPhotos 2016-03-18 10:21:23 -07:00
Components Removed exported constants for fixed-size views 2016-04-26 04:21:39 -07:00
CustomComponents Revert "Add subviewStyle prop to NavigationHeader" 2016-04-26 06:10:24 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Device Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Devtools Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Experimental Integrate RelayConnection with RNFeed 2016-04-22 22:48:18 -07:00
Fetch Reject promise if network request failed 2016-03-08 16:37:24 -08:00
Geolocation Copy comment from LocationModule.java to Geolocation.js 2016-04-13 07:53:23 -07:00
Image Fix 302 ImageLoader caching problem on iOS 2016-04-27 14:40:30 -07:00
Inspector Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Interaction merge InteractionManager stuff back into PanResponder 2016-04-26 13:19:22 -07:00
JavaScriptAppEngine Make polyfills and globals lazy 2016-04-27 09:57:20 -07:00
LayoutAnimation Add support for delete animation in LayoutAnimation on iOS 2016-04-25 00:19:25 -07:00
Linking Mention native code in `Linking` docs 2016-04-20 19:23:19 -07:00
LinkingIOS Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Modal Fix or suppress errors in react-native 2016-04-21 19:47:24 -07:00
NativeApp Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
NavigationExperimental Expose NavigationPropTypes via NavigationExperimental.PropTypes 2016-04-24 04:46:26 -07:00
Network Add support for ontimeout and onerror handler when using XMLHttpRequest for Android and iOS 2016-04-15 05:17:21 -07:00
PullToRefresh Fix red screen due to ref being undefined in PullRefreshViewAndroid 2016-04-19 06:58:22 -07:00
PushNotificationIOS Updated documentation of local notifications for PushNotificationIOS addEventListener() 2016-04-01 09:56:24 -07:00
QuickPerformanceLogger
RCTTest CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS Fix or suppress errors in react-native 2016-04-21 19:47:24 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Storage Update AsyncStorage.js 2016-04-10 18:02:20 -07:00
StyleSheet Add a missing parenthese 2016-03-30 10:04:54 -07:00
Text Removed placeholder image logic 2016-04-25 03:31:19 -07:00
Utilities Add ability to expose sync hooks from Java to JS 2016-04-27 07:51:28 -07:00
Vibration Add support for vibration patterns 2016-03-29 21:45:20 -07:00
WebSocket Fix WebSocket compatibility with event-target-shim ^1.0.5 2016-04-27 12:26:23 -07:00
react-native Fix react-native.js.flow 2016-04-22 18:02:28 -07:00
vendor Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Promise.js Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00