[Mono-bugs] [Bug 79112][Wis] Changed - HttpListenerRequest.InputStream.Read blocks indefinitively

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 20 17:10:39 EDT 2006


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 miguel at ximian.com.

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

--- shadow/79112	2006-08-20 16:16:11.000000000 -0400
+++ shadow/79112.tmp.7895	2006-08-20 17:10:39.000000000 -0400
@@ -117,6 +117,62 @@
 compiled by the makefile.  The complete execution should result in
 'curl' getting back an XML document that wraps the above exception.
 And the Dream runtime should continue to run and be receptive to
 further requests.  On my system, after the exception is reported, the
 application bails out with '** ERROR **: unknown type 0x13 in
 type_to_ldind'.
+
+------- Additional Comments From miguel at ximian.com  2006-08-20 17:10 -------
+Ok, this is a minimal test case, you still need the small XML file
+from Dream (it probably happens with other files, but I dont know).
+
+Alternatively, create a 515 file:
+yes | dd of=file bs=515 count=1
+
+Run the sample:
+mono sample.exe
+
+Then run curl:
+curl -H 'Content-Type: text/xml' -d @file http://localhost:8081/
+
+Or with the original data:
+curl -H 'Content-Type: text/xml' -d
+ at mindtouch.host/show-headers.startup.xml http://localhost:8081/
+
+The sample program is:
+using System;
+using System.Net;
+using System.IO;
+using System.Net.Sockets;
+
+class X {
+        static void Main ()
+        {
+                HttpListener l = new HttpListener ();
+                l.Prefixes.Add ("http://localhost:8081/");
+                l.Start ();
+                l.BeginGetContext (callback, l);
+
+                Console.WriteLine ("Now hit this with curl, like this:
+curl -H 'Content-Type: text/xml' -d
+ at mindtouch.host/show-headers.startup.xml http://localhost:8081/");
+
+                Console.ReadLine ();
+        }
+
+        static void callback (IAsyncResult ar)
+        {
+                Console.WriteLine ("Got a connection");
+                HttpListener l = (HttpListener) ar.AsyncState;
+
+                HttpListenerContext c = l.EndGetContext (ar);
+                HttpListenerRequest request = c.Request;
+
+                StreamReader r = new StreamReader (request.InputStream);
+                r.ReadToEnd ();
+
+                Console.WriteLine ("Done");
+        }
+}
+
+I instrumented bits of the code, this is using the non-chunked code
+path which might be responsible for this.


More information about the mono-bugs mailing list