webapp 0.4.1 → 0.5.0
raw patch · 2 files changed
+5/−3 lines, 2 files
Files
- src/Web/App/Path.hs +4/−2
- webapp.cabal +1/−1
src/Web/App/Path.hs view
@@ -86,8 +86,10 @@ -> Bool pathMatches (RegexPath ex) pin = matchTest ex $ T.encodeUtf8 $ joinPathComps $ delete "/" pin pathMatches (LiteralPath lpin) pin = lpin == delete "/" pin-pathMatches (CapturedPath cpin) pin = pin == sanitizeCapts cpin (delete "/" pin)- where sanitizeCapts = zipWith (\c p -> bool c p $ (fst <$> T.uncons c) == Just ':')+pathMatches (CapturedPath cpin) pin+ | (length cpin) /= (length (delete "/" pin)) = False+ | otherwise = all (== True) $ zipWith capEq cpin (delete "/" pin)+ where capEq c p = bool (c == p) True $ T.isPrefixOf ":" c -- | Returns path captures by comparing @path@ to @pathComps@. pathCaptures :: Path -- ^ path
webapp.cabal view
@@ -1,5 +1,5 @@ Name: webapp-Version: 0.4.1+Version: 0.5.0 Synopsis: Haskell web app framework based on WAI & Warp Homepage: https://github.com/natesymer/webapp Bug-reports: https://github.com/natesymer/webapp/issues