Explorar o código

2003-06-29 Gonzalo Paniagua Javier <[email protected]>

	* WebConnection.cs: fixed header writing the reusing a connection and
	the server does not send 100-continue response.

svn path=/trunk/mcs/; revision=15726
Gonzalo Paniagua Javier %!s(int64=22) %!d(string=hai) anos
pai
achega
273c2c812e

+ 5 - 0
mcs/class/System/System.Net/ChangeLog

@@ -1,3 +1,8 @@
+2003-06-29  Gonzalo Paniagua Javier <[email protected]>
+
+	* WebConnection.cs: fixed header writing the reusing a connection and
+	the server does not send 100-continue response.
+
 2003-06-26  Gonzalo Paniagua Javier <[email protected]>
 
 	* WebConnection.cs: close the socket and connection when disposing.

+ 5 - 5
mcs/class/System/System.Net/WebConnection.cs

@@ -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) {