Merge 1.x -> default

This commit is contained in:
Suha Can
2011-04-08 14:39:02 -07:00
3 changed files with 8 additions and 2 deletions

View File

@@ -337,7 +337,7 @@ namespace Orchard.Specs.Bindings {
public void WhenIAmRedirected() {
var urlPath = "";
if (Details.ResponseHeaders.TryGetValue("Location", out urlPath)) {
WhenIGoTo(urlPath.Replace("http://127.0.0.1/", ""));
WhenIGoTo(urlPath);
}
else {
Assert.Fail("Expected to be redirected but no Location header returned");

View File

@@ -31,7 +31,12 @@ namespace Orchard.Specs.Hosting {
details.UrlPath = urlPath.Substring(0, queryIndex).Replace('\\', '/');
details.Query = urlPath.Substring(queryIndex + 1);
}
details.Page = (isHomepage ? "" : physicalPath.Combine(details.UrlPath.TrimStart('/', '\\')).GetRelativePath(physicalPath).ToString()).Replace('\\','/');
var physicalFilePath = physicalPath.Combine(details.UrlPath.TrimStart('/', '\\'));
details.Page = (isHomepage ? "" : physicalFilePath.GetRelativePath(physicalPath).ToString());
if (!File.Exists(physicalFilePath))
details.Page = details.Page.Replace('\\', '/');
if (!string.IsNullOrEmpty(webHost.Cookies)) {
details.RequestHeaders.Add("Cookie", webHost.Cookies);

View File

@@ -14,3 +14,4 @@ Features:
Description: Adds a notification after creating a new Page with a direct link to create a Widget Layer for that specific page by URL.
Dependencies: Orchard.Widgets
Category: Widget
Priority: -1