[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
Mon, 2 May 2005 09:12:33 -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 ximian-bugzilla@winsper.org.uk.

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

--- shadow/74161	2005-05-02 08:07:07.000000000 -0400
+++ shadow/74161.tmp.7302	2005-05-02 09:12:33.000000000 -0400
@@ -192,6 +192,20 @@
 despite not reaching the end of the document.
 
 This bug is also present in .Net 1.1 SP1, but Microsoft have confirmed
 it no longer happens in 2.0, so they do consider it a bug.  It's a
 blocker for anyone trying to write a Jabber/XMPP client, so I'm
 willing to help fix this issue as much as I can.
+
+------- Additional Comments From ximian-bugzilla@winsper.org.uk  2005-05-02 09:12 -------
+I've done some more reading into this and here's what I found:
+
+The semantics of StreamReader.Read([In, Out] char[], int, int count)
+are such that it will only return if count characters have been read
+or the end of the file is reached.  This is consistent with the
+documentation on MSDN, so Gustavo's solution of commenting out the
+while loop in StreamReader.cs is inappropriate, since it will change
+the behaviour of that method.
+
+The Stream class allows the same Read method to return less than count
+characters, so I'm erring towards suggesting using a different type of
+Stream to read the data.