bugfix: allow superfluous "/" in paths
esp. a trailing / as in bahnhof.name/MH/ should not lead to ??.
This commit is contained in:
parent
cc5048bdb4
commit
df9319f8a0
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ app :: AppData -> Application
|
||||||
app AppData{..} request respond = mkAnswer >>= (respond . toResponse)
|
app AppData{..} request respond = mkAnswer >>= (respond . toResponse)
|
||||||
where
|
where
|
||||||
mkAnswer :: IO Answer
|
mkAnswer :: IO Answer
|
||||||
mkAnswer = case pathInfo request of
|
mkAnswer = case filter (/= mempty) (pathInfo request) of
|
||||||
[] -> pure helptext
|
[] -> pure helptext
|
||||||
["favicon.ico"] -> pure Notfound
|
["favicon.ico"] -> pure Notfound
|
||||||
["cache"] -> do
|
["cache"] -> do
|
||||||
|
|
Loading…
Reference in a new issue