2009-10-15 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 15 Oct 2009 19:16:39 +0000 (19:16 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 15 Oct 2009 19:16:39 +0000 (19:16 -0000)
* ServiceHostBase.cs : eliminate possible '/' + '/foo' combination.

svn path=/trunk/mcs/; revision=144222

mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs

index a9d96751c275c543aa8199a4136785a4ee5e7cb9..503391db2162696bbac03cc2908174e2a8da61e6 100755 (executable)
@@ -1,3 +1,7 @@
+2009-10-15  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ServiceHostBase.cs : eliminate possible '/' + '/foo' combination.
+
 2009-10-15  Sebastien Pouliot  <sebastien@ximian.com>
 
        * ClientRuntimeChannel.cs: Remove the WaitOne 'emitContext' 
index 26bec839d5a0a76600b99727fdf906f8befa628b..8b1624d113635092255b35ea3c60aee74a6db6ff 100644 (file)
@@ -99,10 +99,12 @@ namespace System.ServiceModel
                        if (s.Length == 0)
                                return baseUri;
                        var l = baseUri.LocalPath;
-                       if (l.Length > 0 && l [l.Length - 1] != '/')
-                               return new Uri (String.Concat (baseUri.ToString (), "/", relativeUri.ToString ()));
+                       var r = relativeUri.ToString ();
+
+                       if (l.Length > 0 && l [l.Length - 1] != '/' && r [0] != '/')
+                               return new Uri (String.Concat (baseUri.ToString (), "/", r));
                        else
-                               return new Uri (baseUri, relativeUri);
+                               return new Uri (String.Concat (baseUri.ToString (), r));
                }
 
                public ChannelDispatcherCollection ChannelDispatchers {