[Mono-bugs] [Bug 74161][Nor] Changed - XmlTextReader.Read blocked when reading Xml from Network Stream
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 29 Mar 2005 01:53:00 -0500 (EST)
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 atsushi@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74161
--- shadow/74161 2005-03-28 19:11:32.000000000 -0500
+++ shadow/74161.tmp.28751 2005-03-29 01:53:00.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 74161
Product: Mono: Class Libraries
Version: unspecified
OS: SUSE 9.2
OS Details:
-Status: NEW
+Status: NEEDINFO
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: Sys.XML
AssignedTo: mono-bugs@ximian.com
ReportedBy: anarchyco@hotmail.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -80,6 +80,47 @@
if (bufLength > bufPos) {
Array.Copy (this.buffer, bufPos, buffer, offset, bufRest);
bufPos += bufRest;
}
ret = bufRest; //stream.Read (buffer, offset + bufRest, count -
bufRest); } return ret; }
+
+------- Additional Comments From atsushi@ximian.com 2005-03-29 01:53 -------
+Please post what you can really run on your machine. MS csc never
+compiled your example, and even after fixing, it never reproduces what
+you wrote. MS.NET stops even before XmlTextReader.Read().
+
+using System;
+using System.Net.Sockets;
+using System.Text;
+using System.Xml;
+
+public class Test
+{
+
+public static void Main ()
+{
+
+ TcpClient client = new TcpClient("jabber.org",5222);
+
+ byte [] data = Encoding.UTF8.GetBytes("<stream:stream to='jabber.org'
+xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>");
+ Console.WriteLine ("byte length: " + data.Length);
+
+ client.GetStream().Write (data, 0, data.Length);
+
+ client.GetStream().Flush ();
+
+ Console.WriteLine ("to make sure that block did not happen above.");
+
+ XmlTextReader reader = new XmlTextReader (client.GetStream());
+
+ Console.WriteLine ("again, to make sure that block did not happen
+above.");
+
+ while (reader.Read()) // Never returns both under MS.NET and Mono
+ Console.WriteLine ("Read node");
+
+}
+
+}
+