bugfix: allow superfluous "/" in paths

esp. a trailing / as in bahnhof.name/MH/ should not lead to ??.
This commit is contained in:
stuebinm 2023-12-26 01:52:00 +01:00
parent cc5048bdb4
commit df9319f8a0

View file

@ -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