diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index ac4f7647ae..290f252db3 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -834,12 +834,12 @@ namespace Umbraco.Core.Configuration public int Compare(string part, string whole) { // let the default string comparer deal with null or when part is not smaller then whole - if (part == null || whole == null) + if (part == null || whole == null || part.Length >= whole.Length) return _stringComparer.Compare(part, whole); - //trim the end '/' of each - part = part.TrimEnd('/'); - whole = whole.TrimEnd('/'); + //ensure both have a / on the end + part = part.EndsWith("/") ? part : part + "/"; + whole = whole.EndsWith("/") ? whole : whole + "/"; if (part.Length >= whole.Length) return _stringComparer.Compare(part, whole); diff --git a/src/Umbraco.Tests/ActionsResolverTests.cs b/src/Umbraco.Tests/ActionsResolverTests.cs index 45eab01c35..3885d74808 100644 --- a/src/Umbraco.Tests/ActionsResolverTests.cs +++ b/src/Umbraco.Tests/ActionsResolverTests.cs @@ -8,6 +8,13 @@ using umbraco.interfaces; namespace Umbraco.Tests { + + [TestFixture] + public class GlobalSettingsTests + { + + } + [TestFixture] public class ActionsResolverTests { diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs index 8c95076684..c855a82a46 100644 --- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs +++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs @@ -65,6 +65,8 @@ namespace Umbraco.Tests.Routing [TestCase("/base/somebasehandler", false)] [TestCase("/", true)] [TestCase("/home.aspx", true)] + [TestCase("/umbraco-test", true)] + [TestCase("/install-test", true)] public void Ensure_Request_Routable(string url, bool assert) { var httpContextFactory = new FakeHttpContextFactory(url);