[Mono-bugs] [Bug 81504][Maj] New - Stream from HttpWebResponse cannot timeout

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue May 1 10:28:23 EDT 2007

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 viraptor at kni.prz.rzeszow.pl.


--- shadow/81504	2007-05-01 10:28:23.000000000 -0400
+++ shadow/81504.tmp.13861	2007-05-01 10:28:23.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 81504
+Product: Mono: Class Libraries
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: viraptor at kni.prz.rzeszow.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Stream from HttpWebResponse cannot timeout
+Description of Problem:
+With mono, stream obtained by HttpWebResponse.GetResponseStream has
+Under .Net2.0, .CanTimeout==true for this stream, but .Read throws
+WebException with proper description in message (timeout), instead of
+something else (TimeoutException?).
+Steps to reproduce the problem:
+HttpWebRequest req = (HttpWebRequest) WebRequest.Create("http://google.com");
+HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
+Stream s = resp.GetResponseStream();
+Console.WriteLine("CanTimeout: {0}", s.CanTimeout);
+s.Read(...) //that timeouts
+Actual Results:
+on mono- "CanTimeout: false"
+on .Net2.0: "CanTimeout: true"
+Expected Results:
+CanTimeout: true
+How often does this happen? 
+Additional Information:
+I don't know what exception should be thrown by this stream on timeout, but
+if you do WebException, the message should probably be exactly as in
+.Net2.0, in case someone identifies timeouts by that string.

More information about the mono-bugs mailing list