2003-06-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 29 Jun 2003 17:35:14 +0000 (17:35 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 29 Jun 2003 17:35:14 +0000 (17:35 -0000)
* WebConnection.cs: fixed header writing the reusing a connection and
the server does not send 100-continue response.

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

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

index a1066a3ff39aae5edaf1485e92a1f6ae96e2906e..feeca2f41e60025cc3d52307557295b3c1befb9d 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * WebConnection.cs: fixed header writing the reusing a connection and
+       the server does not send 100-continue response.
+
 2003-06-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * WebConnection.cs: close the socket and connection when disposing.
index c1b40b3ff48487d55ac4a22cc6d4a75b214da085..55a5a3f7fd539ddfe32396b4bad7e46ad8d6dae0 100644 (file)
@@ -109,14 +109,14 @@ namespace System.Net
                internal bool WaitForContinue (byte [] headers, int offset, int size)
                {
                        Data.StatusCode = 0;
-                       if (!sPoint.SendContinue)
-                               return false;
-
-                       if (waitForContinue == null)
+                       waitingForContinue = sPoint.SendContinue;
+                       if (waitingForContinue && waitForContinue == null)
                                waitForContinue = new AutoResetEvent (false);
 
                        Write (headers, offset, size);
-                       waitingForContinue = true;
+                       if (!waitingForContinue)
+                               return false;
+
                        bool result = waitForContinue.WaitOne (2000, false);
                        waitingForContinue = false;
                        if (result) {