+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.
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) {