Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2003-07-20 15:29:09 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2003-07-20 15:29:09 +0400
commit6873f63f258ff044b0d9650371e0f49458197c4e (patch)
tree360499fbc5a1a154c1212651a495e1cc22462444
parent4a30de43e94969bbd112f45f5d93329b7fb19db7 (diff)
2003-07-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* ChunkStream.cs: (WantMore): true if we've not received the last chunk yet. Fixes bug #45463. Thanks to Miguel for tracking this down and providing a test case. * WebConnection.cs: removed bogus ^M's. * WebHeaderCollection.cs: provide more info when the header or value is wrong. svn path=/trunk/mcs/; revision=16441
-rw-r--r--mcs/class/System/System.Net/ChangeLog18
-rw-r--r--mcs/class/System/System.Net/ChunkStream.cs2
-rw-r--r--mcs/class/System/System.Net/WebConnection.cs31
-rw-r--r--mcs/class/System/System.Net/WebHeaderCollection.cs4
4 files changed, 33 insertions, 22 deletions
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index 437ef1dd95d..fbb7ff6e4ad 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,8 +1,22 @@
+2003-07-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * ChunkStream.cs:
+ (WantMore): true if we've not received the last chunk yet. Fixes
+ bug #45463. Thanks to Miguel for tracking this down and providing a
+ test case.
+
+ * WebConnection.cs: removed bogus ^M's.
+
+ * WebHeaderCollection.cs: provide more info when the header or value is
+ wrong.
+
2003-07-15 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* ChunkStream.cs: Removed unused members
- * IPAddress.cs: Removed unused exception variable, fixes compiler warning
- * WebConnection.cs: Removed unused exception variables, fixes compiler warnings
+ * IPAddress.cs: Removed unused exception variable, fixes compiler
+ warning.
+ * WebConnection.cs: Removed unused exception variables, fixes compiler
+ warnings.
2003-07-14 Lluis Sanchez Gual <lluis@ximian.com>
diff --git a/mcs/class/System/System.Net/ChunkStream.cs b/mcs/class/System/System.Net/ChunkStream.cs
index a8400872377..7929d98c217 100644
--- a/mcs/class/System/System.Net/ChunkStream.cs
+++ b/mcs/class/System/System.Net/ChunkStream.cs
@@ -112,7 +112,7 @@ namespace System.Net
}
public bool WantMore {
- get { return (chunkRead != chunkSize); }
+ get { return (chunkRead != chunkSize || chunkSize != 0); }
}
public bool EOF {
diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs
index 05c82be3071..565fcf68ee5 100644
--- a/mcs/class/System/System.Net/WebConnection.cs
+++ b/mcs/class/System/System.Net/WebConnection.cs
@@ -76,24 +76,21 @@ namespace System.Net
IPHostEntry hostEntry = sPoint.HostEntry;
if(hostEntry == null) {
- status = sPoint.UsesProxy ? WebExceptionStatus.ProxyNameResolutionFailure :
- WebExceptionStatus.NameResolutionFailure;
- }
- else {
- foreach(IPAddress address in hostEntry.AddressList) {
+ status = sPoint.UsesProxy ? WebExceptionStatus.ProxyNameResolutionFailure :
+ WebExceptionStatus.NameResolutionFailure;
+ } else {
+ foreach(IPAddress address in hostEntry.AddressList) {
socket = new Socket (address.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
-
- try {
- socket.Connect (new IPEndPoint(address, sPoint.Address.Port));
- status = WebExceptionStatus.Success;
- break;
- }
- catch (SocketException) {
- socket.Close();
- status = WebExceptionStatus.ConnectFailure;
- }
- }
- }
+ try {
+ socket.Connect (new IPEndPoint(address, sPoint.Address.Port));
+ status = WebExceptionStatus.Success;
+ break;
+ } catch (SocketException) {
+ socket.Close();
+ status = WebExceptionStatus.ConnectFailure;
+ }
+ }
+ }
chunkStream = null;
}
diff --git a/mcs/class/System/System.Net/WebHeaderCollection.cs b/mcs/class/System/System.Net/WebHeaderCollection.cs
index a5f294af413..30c0aec228d 100644
--- a/mcs/class/System/System.Net/WebHeaderCollection.cs
+++ b/mcs/class/System/System.Net/WebHeaderCollection.cs
@@ -121,13 +121,13 @@ namespace System.Net
protected void AddWithoutValidate (string headerName, string headerValue)
{
if (!IsHeaderName (headerName))
- throw new ArgumentException ("invalid header name");
+ throw new ArgumentException ("invalid header name: " + headerName, "headerName");
if (headerValue == null)
headerValue = String.Empty;
else
headerValue = headerValue.Trim ();
if (!IsHeaderValue (headerValue))
- throw new ArgumentException ("invalid header value");
+ throw new ArgumentException ("invalid header value: " + headerValue, "headerValue");
base.Add (headerName, headerValue);
}