[Mono-bugs] [Bug 59653][Blo] New - Beta 2 Chunked-Encoding critical bug.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 6 Jun 2004 10:37:19 -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 davidandrewtaylor@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=59653
--- shadow/59653 2004-06-06 10:37:19.000000000 -0400
+++ shadow/59653.tmp.27482 2004-06-06 10:37:19.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 59653
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity: 008 One day
+Priority: Blocker
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: davidandrewtaylor@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Beta 2 Chunked-Encoding critical bug.
+
+There is a nasty bug in MONO (I tested in Beta 2) when reading from a
+Http Stream that is chunked-encoded. I believe the bug(s) are in the
+following 3 classes:
+ChunkStream.cs
+WebConnectionStream.cs
+WebConnection.cs
+
+Please run the testcase test1.cs on MS.NET to see the correct (and
+obviously expected) output which just downloads a WSDL file and prints
+out the first few bytes (and characters). Then try the test on MONO to
+see the very weird and incorrect output. The second part of the test
+demonstrates a freezing problem on MONO when I enable KeepAlives (I have
+no idea why?).
+
+This is an intermittent bug, so try running the test a few times as the
+output seems to depend on timing (how much of the web servers response is
+sitting in the MONO client's buffer).
+
+Clue 1: The only way I have been able to get 100% reliable results is by
+editing the WebConnectionStream.Read method and between the last two
+lines (ReginRead and EndRead - for the asynchronous read) I inserted
+a "ReadAll()" internal method call. I am pretty sure this is pulling all
+the response stream into the MONO client's buffer thus the problem never
+occurs. Of course, this is not a fix, and I just mention it to help you
+understand the bug.
+
+Clue 2: I also tried to find out what was happening in the
+WebConnection.Read method. I noted it calls "nstream.Read" and what is
+strange is that even though that method might be called as "int result =
+nstream.Read(buffer, 0, 4)", result will often be set to 0 even though
+bytes have been copied into the buffer. Thus it would appear erroneous
+bytes were copied into the buffer but the method returned that 0 bytes
+were copied. Obviously this is a clue as to the error.
+
+Clue 3: This only happens when the server uses Chunked-Encoding.