2009-02-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 6 Feb 2009 19:33:19 +0000 (19:33 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 6 Feb 2009 19:33:19 +0000 (19:33 -0000)
* WebConnectionStream.cs: set the content length to 0 when the
response is not supposed to have any content.

svn path=/trunk/mcs/; revision=126090

mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/WebConnectionStream.cs

index 88a6ebd6e9f272135bbd0bfc88576837fcc7715c..9b092546807722eeffa45df08cc4c7fc7ba2a431 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * WebConnectionStream.cs: set the content length to 0 when the
+       response is not supposed to have any content.
+
 2009-02-05  Miguel de Icaza  <miguel@novell.com>
 
        * WebConnectionStream.cs: Prevent a nullref here.   This might
index ef55cf64f7f4b6c670d12d8dbf53fcdb722c8cad..ca1b5ca3bef41a3db46fcf9e1246f3a47f69204e 100644 (file)
@@ -161,6 +161,8 @@ namespace System.Net
                internal void ForceCompletion ()
                {
                        if (!nextReadCalled) {
+                               if (contentLength == Int32.MaxValue)
+                                       contentLength = 0;
                                nextReadCalled = true;
                                cnc.NextRead ();
                        }