diff --git a/Composite/Core/Routing/PageUrls.cs b/Composite/Core/Routing/PageUrls.cs
index 59fcbfead0..4295681aa9 100644
--- a/Composite/Core/Routing/PageUrls.cs
+++ b/Composite/Core/Routing/PageUrls.cs
@@ -24,40 +24,40 @@ public static IPageUrlProvider UrlProvider
///
/// Parses the URL.
///
- /// The URL.
+ /// The absolute URL.
///
- public static PageUrlData ParseUrl(string url)
+ public static PageUrlData ParseUrl(string absoluteUrl)
{
UrlKind urlKind;
- return ParseUrl(url, out urlKind);
+ return ParseUrl(absoluteUrl, out urlKind);
}
///
/// Parses the URL.
///
- /// The URL.
+ /// The absolute URL.
/// Kind of the URL.
///
- public static PageUrlData ParseUrl(string url, out UrlKind urlKind)
+ public static PageUrlData ParseUrl(string absoluteUrl, out UrlKind urlKind)
{
- if (url.StartsWith("http") && url.Contains("://"))
+ if (absoluteUrl.StartsWith("http") && absoluteUrl.Contains("://"))
{
- return UrlProvider.ParseUrl(url, out urlKind);
+ return UrlProvider.ParseUrl(absoluteUrl, out urlKind);
}
- return UrlProvider.ParseUrl(url, new UrlSpace(), out urlKind);
+ return UrlProvider.ParseUrl(absoluteUrl, new UrlSpace(), out urlKind);
}
///
/// Parses the URL.
///
- /// The URL.
+ /// The relative URL.
/// The URL space.
/// Kind of the URL.
///
- public static PageUrlData ParseUrl(string url, UrlSpace urlSpace, out UrlKind urlKind)
+ public static PageUrlData ParseUrl(string relativeUrl, UrlSpace urlSpace, out UrlKind urlKind)
{
- return UrlProvider.ParseUrl(url, urlSpace, out urlKind);
+ return UrlProvider.ParseUrl(relativeUrl, urlSpace, out urlKind);
}
///
diff --git a/Composite/Core/Routing/UrlSpace.cs b/Composite/Core/Routing/UrlSpace.cs
index c0313f0b36..59ef366fa1 100644
--- a/Composite/Core/Routing/UrlSpace.cs
+++ b/Composite/Core/Routing/UrlSpace.cs
@@ -1,4 +1,5 @@
-using System.Web;
+using System;
+using System.Web;
using Composite.Plugins.Routing.Pages;
namespace Composite.Core.Routing
@@ -33,7 +34,6 @@ public UrlSpace()
}
}
-
///
/// Initializes a new instance of the class.
///
@@ -54,7 +54,9 @@ public UrlSpace(HttpContextBase httpContextBase)
{
Verify.ArgumentNotNull(httpContextBase, "httpContextBase");
- Initialize(httpContextBase.Request.Url.Host, httpContextBase.Request.Url.LocalPath);
+ var url = httpContextBase.Request.Url;
+
+ Initialize(url.Host, url.LocalPath);
}
private void InitializeThroughHttpContext(HttpContext httpContext)
diff --git a/Website/Composite/services/Tree/TreeServices.asmx b/Website/Composite/services/Tree/TreeServices.asmx
index 1f95c32806..f25f84941c 100644
--- a/Website/Composite/services/Tree/TreeServices.asmx
+++ b/Website/Composite/services/Tree/TreeServices.asmx
@@ -176,7 +176,8 @@ namespace Composite.Services
public string GetEntityTokenByPageUrl(string pageUrl)
{
UrlKind urlKind;
- PageUrlData pageUrlData = PageUrls.ParseUrl(pageUrl, new UrlSpace(HttpContext.Current), out urlKind);
+
+ PageUrlData pageUrlData = PageUrls.ParseUrl(pageUrl, out urlKind);
if (pageUrlData == null) return string.Empty;
if (pageUrlData.PublicationScope == PublicationScope.Published)