Fixes URL case sensitivity problem when there's a path between a wiki and the site root. Resolves #359.
This commit is contained in:
parent
8806160f26
commit
499c7bd777
2 changed files with 10 additions and 3 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.0.336")]
|
[assembly: AssemblyVersion("3.0.0.337")]
|
||||||
[assembly: AssemblyFileVersion("3.0.0.336")]
|
[assembly: AssemblyFileVersion("3.0.0.337")]
|
||||||
|
|
|
@ -600,7 +600,14 @@ namespace ScrewTurn.Wiki {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CookiePath {
|
public static string CookiePath {
|
||||||
get {
|
get {
|
||||||
return HttpContext.Current.Request.ApplicationPath;
|
string requestUrl = HttpContext.Current.Request.RawUrl;
|
||||||
|
string virtualDirectory = HttpContext.Current.Request.ApplicationPath;
|
||||||
|
// We need to convert the case of the virtual directory to that used in the url
|
||||||
|
// Return the virtual directory as is if we can't find it in the URL
|
||||||
|
if (requestUrl.ToLower().Contains(virtualDirectory.ToLower())) {
|
||||||
|
return requestUrl.Substring(requestUrl.ToLower().IndexOf(virtualDirectory.ToLower()),virtualDirectory.Length);
|
||||||
|
}
|
||||||
|
return virtualDirectory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue