From df9319f8a0e1b67624a42c685f1c12af0eb0e140 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 26 Dec 2023 01:52:00 +0100 Subject: [PATCH] bugfix: allow superfluous "/" in paths esp. a trailing / as in bahnhof.name/MH/ should not lead to ??. --- app/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Main.hs b/app/Main.hs index d874c7d..6712c62 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -107,7 +107,7 @@ app :: AppData -> Application app AppData{..} request respond = mkAnswer >>= (respond . toResponse) where mkAnswer :: IO Answer - mkAnswer = case pathInfo request of + mkAnswer = case filter (/= mempty) (pathInfo request) of [] -> pure helptext ["favicon.ico"] -> pure Notfound ["cache"] -> do