Commits

ScrewTurn Wiki committed 59b770c

Fixes URL case sensitivity problem when there's a path between a wiki and the site root. Resolves #359.

  • Participants
  • Parent commits 05054f2

Comments (0)

Files changed (2)

File AssemblyVersion.cs

 //
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
-[assembly: AssemblyVersion("3.0.0.336")]
-[assembly: AssemblyFileVersion("3.0.0.336")]
+[assembly: AssemblyVersion("3.0.0.337")]
+[assembly: AssemblyFileVersion("3.0.0.337")]

File Core/Settings.cs

 		/// </summary>
 		public static string CookiePath {
 			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;
 			}
 		}