summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-03-30 13:31:48 -0700
committerSamantha Houts <samantha@teamredwall.com>2016-03-30 13:31:48 -0700
commitb3a64fadb3951d4e5e65b5f000a5f930772c01ed (patch)
treeadb3b872a0a68d17b2cf2d4c56b93bf982d7a767
parent99f73196b60cef980145384ef64ca0e58aa06b16 (diff)
parent54eaebe79dc9abd86a4c036dfd41c41d458f4605 (diff)
downloadxamarin-forms-b3a64fadb3951d4e5e65b5f000a5f930772c01ed.tar.gz
xamarin-forms-b3a64fadb3951d4e5e65b5f000a5f930772c01ed.tar.bz2
xamarin-forms-b3a64fadb3951d4e5e65b5f000a5f930772c01ed.zip
Merge pull request #28 from xamarin/fix-bugzilla39359
[iOS,Android,Win] Make sure we only cache images that return a succes…
-rw-r--r--Xamarin.Forms.Platform.WinRT/WindowsBasePlatformServices.cs2
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;
}
}