diff options
Diffstat (limited to 'mcs/class/System/System.Net/HttpWebRequest.cs')
-rw-r--r-- | mcs/class/System/System.Net/HttpWebRequest.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs index f20a0747a3f..40dfe26a546 100644 --- a/mcs/class/System/System.Net/HttpWebRequest.cs +++ b/mcs/class/System/System.Net/HttpWebRequest.cs @@ -584,6 +584,7 @@ namespace System.Net initialMethod = method; if (haveRequest) { if (writeStream != null) { + Monitor.Exit (this); asyncWrite.SetCompleted (true, writeStream); asyncWrite.DoCallback (); return asyncWrite; @@ -829,7 +830,7 @@ namespace System.Net throw new WebException ("No Location header found for " + (int) code, WebExceptionStatus.ProtocolError); - Uri prev = actualUri; + string host = actualUri.Host; try { actualUri = new Uri (actualUri, uriString); } catch (Exception) { @@ -838,8 +839,7 @@ namespace System.Net WebExceptionStatus.ProtocolError); } - hostChanged = (actualUri.Scheme != prev.Scheme || actualUri.Host != prev.Host || - actualUri.Port != prev.Port); + hostChanged = (actualUri.Host != host); return true; } |