[Mono-bugs] [Bug 511851] New: HttpWebRequest.Begin* methods do not throw a WebException if abort has been called.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 10 14:12:29 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=511851


           Summary: HttpWebRequest.Begin* methods do not throw a
                    WebException if abort has been called.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: michael.c.urbanski at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10)
Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10

Example:

private void GetResponse (RequestState state)
{
    request.Abort ();
    Thread.Sleep (1000);

    try {
        request.BeginGetResponse (ThisIsCthulhuGoAheadCaller, state);
    } catch (Exception e) {
        // Caught an exception.
    }
}

..will not throw a WebException.  This makes aborting asynchronous
HttpWebRequests, safely / reliably, very difficult.

Documented: 
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.begingetresponse(VS.71).aspx



Reproducible: Always

Steps to Reproduce:
Call an 'HttpWebRequest.Begin*' method such as 'BeginGetResponse' after calling
'Abort'.
Actual Results:  
Nothing.  The call to 'BeginGetResponse' completes w\o error, and, under
certain circumstances, the request will never complete.

Expected Results:  
A 'WebException' should be thrown is a user attempts to call an
'HttpWebRequest.Begin*' after an Abort.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list