[Mono-bugs] [Bug 80559][Wis] New - UriBuilder.ToString () broken

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jan 19 11:47:31 EST 2007


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 stephane at delcroix.org.

http://bugzilla.ximian.com/show_bug.cgi?id=80559

--- shadow/80559	2007-01-19 11:47:31.000000000 -0500
+++ shadow/80559.tmp.26627	2007-01-19 11:47:31.000000000 -0500
@@ -0,0 +1,59 @@
+Bug#: 80559
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: stephane at delcroix.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: UriBuilder.ToString () broken
+
+the UriBuilder.ToString () method is either broken or don't follow the way
+it's specified in the documentation.
+
+Here's a piece of code:
+
+>>>SNIP
+using System;
+
+public class Test {
+	public static void Main ()
+	{
+		UriBuilder uri = new UriBuilder ("http://www.mono-project.com/Main_Page");
+		uri.Fragment = "Features";
+		Console.WriteLine (uri.Fragment);
+		Console.WriteLine (uri.ToString ());
+	}
+}
+<<<SNAP
+
+Which, once executed, returns this:
+>>>SNIP
+#Features
+http://www.mono-project.com:80/Main_Page
+<<<SNAP
+
+meaning that uri.Fragment is set correctly, but uri.ToString () should
+returns: http://www.mono-project.com:80/Main_Page#Features, as specified in
+the documentation:
+
+>>>SNIP
+The string returned by this method (shown here as uriString) is constructed
+as follows:
+        
+        uriString = scheme + scheme delimiter + host.
+        If port != -1 and host != "", then uriString = uriString + ":" + port.
+        If host != "" and path != "" and path != "/", then uriString =
+uriString + "/".
+        uriString = uriString + path.
+        If fragment != "", then uriString = uriString + fragment, else
+uriString = uriString + query.
+<<<SNAP


More information about the mono-bugs mailing list