https://bugzilla.novell.com/show_bug.cgi?id=343064

           Summary: System.Net.WebClient.DownloadString() fails in invalid
                    protocol
           Product: Mono: Class Libraries
           Version: 1.2.5
          Platform: i686
        OS/Version: UNIX Other
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


Description of Problem:

When System.Net.WebClient.DownloadString() is used to access an url that starts
with an invalid protocol string (e.g. "tp://localhost"), mono-1.2.5.1 on Fedora
Core 6 throws a System.NotSupportedException, rather than a
System.Net.WebException.

Note that MS .Net 2.0 throws a System.Net.WebException in this scenario.

Steps to reproduce the problem:

The following program fails on mono, but succeeds on .Net:

try
{
    new System.Net.WebClient().DownloadString("tp://invalid.url");
    Assert.Fail();
}
catch (System.Net.WebException) { }
catch (NotSupportedException)
{
    Assert.Fail();
}


Actual Results:

DownloadString("tp://invalid.url") throws a NotSupportedException.

Expected Results:

DownloadString("tp://invalid.url") should throw a WebException.

How often does this happen? 

Every time.

Additional Information:


-- 
Configure bugmail: https://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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to