浏览代码

2005-04-07 Gonzalo Paniagua Javier <[email protected]>

	* WebConnectionStream.cs: ForceCompletion actually calls NextRead. No
	need to wait for a Close/ReadAll when we have no content.


svn path=/trunk/mcs/; revision=42650
Gonzalo Paniagua Javier 21 年之前
父节点
当前提交
7b00247cb9
共有 2 个文件被更改,包括 8 次插入3 次删除
  1. 5 0
      mcs/class/System/System.Net/ChangeLog
  2. 3 3
      mcs/class/System/System.Net/WebConnectionStream.cs

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

@@ -1,3 +1,8 @@
+2005-04-07 Gonzalo Paniagua Javier <[email protected]>
+
+	* WebConnectionStream.cs: ForceCompletion actually calls NextRead. No
+	need to wait for a Close/ReadAll when we have no content.
+
 2005-04-04 Gonzalo Paniagua Javier <[email protected]>
 
 	* NtlmClient.cs: fix typo in assembly name.

+ 3 - 3
mcs/class/System/System.Net/WebConnectionStream.cs

@@ -57,7 +57,6 @@ namespace System.Net
 		byte [] headers;
 		bool disposed;
 		bool headersSent;
-		bool forceCompletion;
 
 		public WebConnectionStream (WebConnection cnc)
 		{
@@ -116,13 +115,14 @@ namespace System.Net
 
 		internal void ForceCompletion ()
 		{
-			forceCompletion = true;
+			nextReadCalled = true;
+			cnc.NextRead ();
 		}
 		
 		internal void CheckComplete ()
 		{
 			bool nrc = nextReadCalled;
-			if (forceCompletion || (!nrc && readBufferSize - readBufferOffset == contentLength)) {
+			if (!nrc && readBufferSize - readBufferOffset == contentLength) {
 				nextReadCalled = true;
 				cnc.NextRead ();
 			}