diff options
author | Miguel de Icaza <miguel@gnome.org> | 2005-05-04 17:40:39 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2005-05-04 17:40:39 +0400 |
commit | 999eedbde2286858dee3a28b3de17cf7c7ee6aa3 (patch) | |
tree | 58a18714937098e21f0778778dfa4d819eb12109 | |
parent | 22812f244240dbd81986cbdcb819436544c11548 (diff) |
Apply patch from r44008 fixes, 74817mono-1.1.7
svn path=/branches/mono-1-1-7/mcs/; revision=44025
-rw-r--r-- | mcs/class/System/System.Net/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/System/System.Net/WebConnection.cs | 13 |
2 files changed, 14 insertions, 5 deletions
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog index 928f21e3bff..52d120a9868 100644 --- a/mcs/class/System/System.Net/ChangeLog +++ b/mcs/class/System/System.Net/ChangeLog @@ -1,3 +1,9 @@ +2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * WebConnection.cs: don't rethrow errors in Write, as the error will be + received by GetResponse*. The result is that the threadpool thread doing + this will not end up printing the exception. Fixes bug #74817. + 2005-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com> * ServicePoint.cs: HostEntry needs to be thread safe. diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs index c8370a004f8..537d5843325 100644 --- a/mcs/class/System/System.Net/WebConnection.cs +++ b/mcs/class/System/System.Net/WebConnection.cs @@ -245,6 +245,7 @@ namespace System.Net request.ClientCertificates, request, buffer}; nstream = (Stream) Activator.CreateInstance (sslStream, args); + certsAvailable = false; } // we also need to set ServicePoint.Certificate // and ServicePoint.ClientCertificate but this can @@ -809,18 +810,20 @@ namespace System.Net if (ssl && !certsAvailable) GetCertificates (); } catch (Exception e) { - if (e is WebException) - throw e; - WebExceptionStatus wes = WebExceptionStatus.SendFailure; + string msg = "Write"; + if (e is WebException) { + HandleError (wes, e, msg); + return; + } // if SSL is in use then check for TrustFailure if (ssl && (bool) piTrustFailure.GetValue (nstream, null)) { wes = WebExceptionStatus.TrustFailure; + msg = "Trust failure"; } - HandleError (wes, e, "Write"); - throw new WebException ("Not connected", e, wes, null); + HandleError (wes, e, msg); } } |