From 66d7f7c4f3995f67e4fca270d77a6df1c2c911ae Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Wed, 22 Dec 2010 12:48:36 +0000 Subject: [PATCH] Improved error handling in UploadManager --- Builder/IISMainHandler/build.txt | 2 +- Common/UploadManager.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index dc97b5a..3a657e2 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -1839 \ No newline at end of file +1853 \ No newline at end of file diff --git a/Common/UploadManager.cs b/Common/UploadManager.cs index 8b8e641..b5c6203 100644 --- a/Common/UploadManager.cs +++ b/Common/UploadManager.cs @@ -138,6 +138,9 @@ namespace FLocal.Common { response = (HttpWebResponse)request.GetResponse(); } catch(WebException e) { response = (HttpWebResponse)e.Response; + if(response == null) { + throw; + } } using(Stream responseStream = response.GetResponseStream()) { responseStream.WriteTo(output);