Permalink
Browse files

make single * match everything

  • Loading branch information...
1 parent 09ff0bf commit e683529e5d8e1e09d4163fbae65a3c556aa3ed24 @nfjinjing committed Jun 24, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/Network/Loli/Middleware/LoliRouter.hs
@@ -31,11 +31,13 @@ loli_router prefix runner route_path app = \env ->
parse_params :: String -> String -> Maybe (String, Assoc)
+parse_params "*" x = Just (x, [])
parse_params "" "" = Just ("", [])
parse_params "" _ = Nothing
parse_params "/" "" = Nothing
parse_params "/" "/" = Just ("/", [])
+
parse_params t s =
let template_tokens = t.split "/"
url_tokens = s.split "/"

0 comments on commit e683529

Please sign in to comment.