I've opened a new bug in bugzilla :
http://bugzilla.ximian.com/show_bug.cgi?id=76501

If you execute the following code on mono :

UriBuilder ub=new UriBuilder("http://mondomaine/trucmuche/login.aspx");
ub.Query=ub.Query.TrimStart(new char[]{'?'})+"&ticket=bla";
Console.WriteLine("(URIBUILDER)Redirige vers :" +ub.ToString());
Console.ReadLine();

you'll obtain :
http://mondomaine:80//trucmuche/login.aspx?&ticket=bla
(note the double / after :80)

on MS.NET you'll obtain
http://mondomaine:80/trucmuche/login.aspx?&ticket=bla

I've done a little patch to solve this issue...
Could someone apply it...
_______________________________________________
Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.
Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu.
Index: System/UriBuilder.cs
===================================================================
--- System/UriBuilder.cs	(revision 52016)
+++ System/UriBuilder.cs	(working copy)
@@ -260,9 +260,15 @@
 			builder.Append (host);
 			if (port > 0)
 				builder.Append (":" + port);
-
-			if (path != String.Empty)
-				builder.Append ('/');
+
+			if (path != String.Empty)
+			{
+				if (!builder.ToString().EndsWith("/"))
+				{
+					if (!path.StartsWith("/"))
+						builder.Append ('/');
+				}
+			}
 			builder.Append (path);
 			builder.Append (query);
 
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to