[Mono-bugs] [Bug 532291] New: UriBuilder generates incorrect results with empty host

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Aug 18 18:31:17 EDT 2009


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


           Summary: UriBuilder generates incorrect results with empty host
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dmitchell at logos.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us)
AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9

Under windows, an expression like this:

new UriBuilder { Scheme = "abc", Host = string.Empty, Path = "blah"
}.Uri.ToString()

will result in the string "abc:blah", while under Mono, the result is
"abc://blah". Furthermore, inspecting a Uri generated by UriBuilder in this
fashion will reveal that "blah" has become the host, rather than the path.

Furthermore, attempting to build a Uri like this:

new UriBuilder { Scheme = "abc", Host = string.Empty, Path = "blah:blah" }.Uri

will cause an exception to be thrown with the explanation that the Uri has an
invalid port number.

Reproducible: Always

Steps to Reproduce:
1. Attempt to run either of the expressions above in the csharp shell.
2.
3.
Actual Results:  
A Uri is generated with incorrect information or an exception is thrown.

Expected Results:  
A Uri should be generated with correct information.

-- 
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