diff options
author | Rui Marinho <me@ruimarinho.net> | 2016-03-28 19:10:50 +0100 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-03-28 19:28:36 +0100 |
commit | 54eaebe79dc9abd86a4c036dfd41c41d458f4605 (patch) | |
tree | f4ffe0299be75f9623a3ea809e6c50f9832d076f /Xamarin.Forms.Platform.WinRT | |
parent | 346338b5dc3c84b80969376bc87e886f4ef880a8 (diff) | |
download | xamarin-forms-54eaebe79dc9abd86a4c036dfd41c41d458f4605.tar.gz xamarin-forms-54eaebe79dc9abd86a4c036dfd41c41d458f4605.tar.bz2 xamarin-forms-54eaebe79dc9abd86a4c036dfd41c41d458f4605.zip |
[iOS,Android,Win] Make sure we only cache images that return a successful status code
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT')
-rw-r--r-- | Xamarin.Forms.Platform.WinRT/WindowsBasePlatformServices.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/WindowsBasePlatformServices.cs b/Xamarin.Forms.Platform.WinRT/WindowsBasePlatformServices.cs index dcda2c2f..614a0972 100644 --- a/Xamarin.Forms.Platform.WinRT/WindowsBasePlatformServices.cs +++ b/Xamarin.Forms.Platform.WinRT/WindowsBasePlatformServices.cs @@ -118,7 +118,7 @@ namespace Xamarin.Forms.Platform.WinRT using (var client = new HttpClient()) { HttpResponseMessage streamResponse = await client.GetAsync(uri.AbsoluteUri).ConfigureAwait(false); - return await streamResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + return streamResponse.IsSuccessStatusCode ? await streamResponse.Content.ReadAsStreamAsync().ConfigureAwait(false) : null; } } |