[Mono-bugs] [Bug 78078][Wis] New - GetResponse Timeout in WebRequest
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Apr 11 12:48:44 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 dlacroix at erasme.org.
http://bugzilla.ximian.com/show_bug.cgi?id=78078
--- shadow/78078 2006-04-11 12:48:44.000000000 -0400
+++ shadow/78078.tmp.26895 2006-04-11 12:48:44.000000000 -0400
@@ -0,0 +1,91 @@
+Bug#: 78078
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details: Fedora Core 4
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: dlacroix at erasme.org
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: GetResponse Timeout in WebRequest
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+I use a WebRequest to log some event on a HTTP server. The third log always
+finish in a long timeout.
+
+Here is the code:
+
+WebRequest req = WebRequest.Create("http://localhost/log.php");
+req.GetResponse();
+
+Here is the Exception for the third call:
+
+Unhandled Exception: System.Net.WebException: The request timed out
+in <0x00147> System.Net.HttpWebRequest:EndGetResponse (System.IAsyncResult)
+in <0x00047> System.Net.HttpWebRequest:GetResponse ()
+
+GetResponse dont even try any web request. If a change the code to:
+
+WebRequest req = WebRequest.Create("http://localhost/log.php");
+Stream stream = req.GetResponse().GetResponseStream();
+stream.Close();
+
+it works all time. But the first code should work.
+
+Steps to reproduce the problem:
+1. create a small program with only WebRequest.Create and GetResponse
+ with a loop on this code. ex:
+
+using System;
+using System.Net;
+
+public class MainClass
+{
+ public static void Main(string[] args)
+ {
+ while(true) {
+ WebRequest req =
+WebRequest.Create("http://localhost/musee/log.php");
+ req.GetResponse();
+ Console.WriteLine("Request done");
+ }
+ }
+}
+
+2. compile it. ex:
+
+mcs test.cs -r:System.dll
+
+3. run it
+
+Actual Results:
+
+Request done
+Request done
+(then freeze)
+
+Expected Results:
+Request done
+Request done
+Request done
+Request done
+(infinite loop)
+
+How often does this happen?
+
+Each time at the third call to req.GetResponse(). And each time you use the
+given example.
+
+Additional Information:
+
+I am using mono 1.1.13.6.
More information about the mono-bugs
mailing list