[Mono-bugs] [Bug 41600][Nor] New - WebResponse Strem return truncated info

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sat, 19 Apr 2003 12:37:49 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by juancri@tagnet.org.

http://bugzilla.ximian.com/show_bug.cgi?id=41600

--- shadow/41600	Sat Apr 19 12:37:49 2003
+++ shadow/41600.tmp.31212	Sat Apr 19 12:37:49 2003
@@ -0,0 +1,62 @@
+Bug#: 41600
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: juancri@tagnet.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: WebResponse Strem return truncated info
+
+this returns a truncated page (it works well with MS.NET):
+
+output in mono:
+1024
+200
+1024
+416
+902
+=END=
+
+output in ms:
+1024
+1024
+583
+935
+404
+99
+1024
+...etc (the hole page)
+
+
+
+
+using System;
+using System.IO;
+using System.Net;
+
+
+class Test
+{
+	public static void Main ()
+	{
+		string url = "http://www.ximian.com";
+		HttpWebRequest request = (HttpWebRequest) 
+WebRequest.Create (url);
+		HttpWebResponse response = (HttpWebResponse) 
+request.GetResponse ();
+		Stream stream = response.GetResponseStream ();
+		int num;
+		byte[] bytes = new byte[1024];
+		while ((num = stream.Read (bytes, 0, bytes.Length)) > 0)
+			Console.WriteLine (num);
+	}
+}