react-native/Libraries/Image
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
..
RCTImage.xcodeproj Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
__tests__ Introduce custom asset resolver to resolveAssetSource(..) 2016-03-15 20:20:27 -07:00
AssetRegistry.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
AssetSourceResolver.js Fixes OSS build: haste module -> commonJS invariant 2016-03-16 06:57:26 -07:00
GlobalImageStub.js Removed references to isStatic from the codebase 2015-10-13 06:44:30 -07:00
Image.android.js Add a way to prefetch remote images to cache with Image.prefetch 2016-04-13 07:30:28 -07:00
Image.ios.js Add a way to prefetch remote images to cache with Image.prefetch 2016-04-13 07:30:28 -07:00
ImageEditor.js CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
ImageResizeMode.js Add center ImageResizeMode option 2016-03-19 11:25:24 -07:00
ImageSource.js Fix flow errors 2015-12-31 07:48:29 -08:00
ImageStore.js Open sourced <ImageEditor>, <ImageStore> for Android 2016-01-27 10:50:54 -08:00
ImageStylePropTypes.js Added support for Image corner radii in Android 2016-04-13 07:42:20 -07:00
RCTGIFImageDecoder.h Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
RCTGIFImageDecoder.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageBlurUtils.h Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTImageBlurUtils.m Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTImageEditingManager.h [React Native] open source ImageEditingManager native module 2015-07-29 15:57:48 -08:00
RCTImageEditingManager.m fix an image cropping bug when displaySize is specified 2016-02-18 00:38:31 -08:00
RCTImageLoader.h Dispatch module setup asynchronously to avoid blocking main thread when bridge starts 2016-03-03 02:21:36 -08:00
RCTImageLoader.m Fix 302 ImageLoader caching problem on iOS 2016-04-27 14:40:30 -07:00
RCTImageStoreManager.h RTCImageStoreManager uses NSData instead of UIImage 2015-11-17 09:55:31 -08:00
RCTImageStoreManager.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageUtils.h Removed placeholder image logic 2016-04-25 03:31:19 -07:00
RCTImageUtils.m Removed placeholder image logic 2016-04-25 03:31:19 -07:00
RCTImageView.h Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTImageView.m Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTImageViewManager.h Merged RCTNetworkImageView functionality into RCTStaticImage 2015-07-17 07:43:16 -08:00
RCTImageViewManager.m Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTResizeMode.h Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTResizeMode.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTShadowVirtualImage.h Added support for width & height for text images 2016-01-22 11:32:32 -08:00
RCTShadowVirtualImage.m Removed placeholder image logic 2016-04-25 03:31:19 -07:00
RCTVirtualImageManager.h Implemented inline image support for <Text> 2015-10-08 11:56:25 -07:00
RCTVirtualImageManager.m Added support for width & height for text images 2016-01-22 11:32:32 -08:00
RCTXCAssetImageLoader.h Unify XCAsset handling logic 2015-10-12 04:15:27 -07:00
RCTXCAssetImageLoader.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RelativeImageStub.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
resolveAssetSource.js Introduce custom asset resolver to resolveAssetSource(..) 2016-03-15 20:20:27 -07:00