mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Correcting the slashes in paths for specflow tests.
Helps to correct the invalid values (according to Url.IsLocalUrl) for the return URLs we've been seeing in the spec tests. Gets the "works on my box" stamp of approval. --HG-- branch : 1.x
This commit is contained in:
@@ -23,15 +23,15 @@ namespace Orchard.Specs.Hosting {
|
||||
|
||||
var details = new RequestDetails {
|
||||
HostName = webHost.HostName,
|
||||
UrlPath = urlPath,
|
||||
UrlPath = urlPath.Replace('\\', '/'),
|
||||
};
|
||||
|
||||
int queryIndex = urlPath.IndexOf('?');
|
||||
if (queryIndex >= 0) {
|
||||
details.UrlPath = urlPath.Substring(0, queryIndex);
|
||||
details.UrlPath = urlPath.Substring(0, queryIndex).Replace('\\', '/');
|
||||
details.Query = urlPath.Substring(queryIndex + 1);
|
||||
}
|
||||
details.Page = (isHomepage ? "" : physicalPath.Combine(details.UrlPath.TrimStart('/', '\\')).GetRelativePath(physicalPath).ToString());
|
||||
details.Page = (isHomepage ? "" : physicalPath.Combine(details.UrlPath.TrimStart('/', '\\')).GetRelativePath(physicalPath).ToString()).Replace('\\','/');
|
||||
|
||||
if (!string.IsNullOrEmpty(webHost.Cookies)) {
|
||||
details.RequestHeaders.Add("Cookie", webHost.Cookies);
|
||||
|
Reference in New Issue
Block a user