diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Cana/Extra.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Cana/Extra.hs b/src/Cana/Extra.hs index c776160..efcdb8c 100644 --- a/src/Cana/Extra.hs +++ b/src/Cana/Extra.hs @@ -44,7 +44,8 @@ geminiMime = "text/gemini" staticFiles :: FilePath -- ^ Base directory where static files are searched. -> Handler staticFiles basedir request = do - let reqPath = sanitize . uriPath . requestUri $ request + let reqPath' = uriPath . requestUri $ request + reqPath = if null reqPath' then "/" else sanitize reqPath' fsPath = basedir ++ reqPath notFoundResponse = GeminiResponse { responseStatus = codeNotFound |