diff options
author | stuebinm | 2023-12-26 01:52:00 +0100 |
---|---|---|
committer | stuebinm | 2023-12-26 01:52:00 +0100 |
commit | df9319f8a0e1b67624a42c685f1c12af0eb0e140 (patch) | |
tree | 6a1c1808ec7f64df95df3c8935d0697bb1f87a96 | |
parent | cc5048bdb45bf777b2e823323c655e4c36560892 (diff) |
bugfix: allow superfluous "/" in paths
esp. a trailing / as in bahnhof.name/MH/ should not lead to ??.
-rw-r--r-- | app/Main.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |