[Mono-bugs] [Bug 69001][Nor] New - WebRequest exceptions
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 1 Nov 2004 18:09:14 -0500 (EST)
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 xavier@blackbloodstudios.com.
http://bugzilla.ximian.com/show_bug.cgi?id=69001
--- shadow/69001 2004-11-01 18:09:14.000000000 -0500
+++ shadow/69001.tmp.15224 2004-11-01 18:09:14.000000000 -0500
@@ -0,0 +1,47 @@
+Bug#: 69001
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details: Debian Sid
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: xavier@blackbloodstudios.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: WebRequest exceptions
+
+Description of Problem:
+WebRequest doesn't seem to throw exceptions when doing asyncronous requests
+with BeginGetResponse and family.
+
+Simple code snippet:
+Assuming that url is invalid and that it should throw a 404 exception we
+test the following code:
+
+ try {
+ // Create a new request and set the proxy
+ mRequest = WebRequest.Create(url);
+
+ // Begin the request
+ IAsyncResult r = (IAsyncResult) mRequest.BeginGetResponse(new
+AsyncCallback(on_response_callback), mRequest);
+ }
+ catch (WebException e) {
+ Console.WriteLine("exception");
+ }
+
+Actual Results:
+It turns out that the exception is never thrown, I tested the same code on
+.NET and it works perfectly.
+
+Expected Results:
+It should throw the exception on Linux too.
+
+Just for kicks I tried it with Mono on windows (using the combined 1.0.2
+installer) and it didn't work either.