Commits

Anton Tayanovskyy committed da706b1

Fix double slash problem in URLs.

  • Participants
  • Parent commits b79b7f9

Comments (0)

Files changed (2)

File IntelliFactory.WebSharper.Sitelets/Extensions.fs

         let startsWithSlash (s: string) =
             s.Length > 0
             && s.[0] = '/'
-
         let endsWithSlash (s: string) =
             s.Length > 0
             && s.[s.Length - 1] = '/'

File IntelliFactory.WebSharper.Sitelets/HttpModule.fs

             ApplicationPath = appPath
             ResolveUrl = fun url ->
                 if url.StartsWith("~") then
-                    appPath + url.Substring(1)
+                    joinWithSlash appPath (url.Substring(1))
                 else
                     url
             Json = ResourceContext.SharedJson()