packages feed

wai-app-static 0.0.0 → 0.0.1

raw patch · 2 files changed

+9/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Network.Wai.Application.Static: staticAppPieces :: StaticSettings -> [String] -> Application

Files

Network/Wai/Application/Static.hs view
@@ -26,6 +26,7 @@       -- * WAI application     , StaticSettings (..)     , staticApp+    , staticAppPieces     ) where  import qualified Network.Wai as W@@ -233,13 +234,17 @@     }  staticApp :: StaticSettings -> W.Application-staticApp _ req+staticApp set req = do+    let pieces = decodePathInfo $ S8.unpack $ W.pathInfo req+    staticAppPieces set pieces req++staticAppPieces :: StaticSettings -> [String] -> W.Application+staticAppPieces _ _ req     | W.requestMethod req /= "GET" = return $ W.responseLBS         W.status405         [("Content-Type", "text/plain")]         "Only GET is supported"-staticApp (StaticSettings folder indices mlisting getmime) req = liftIO $ do-    let pieces = decodePathInfo $ S8.unpack $ W.pathInfo req+staticAppPieces (StaticSettings folder indices mlisting getmime) pieces _ = liftIO $ do     cp <- checkPieces folder indices pieces     case cp of         Redirect pieces' -> do
wai-app-static.cabal view
@@ -1,5 +1,5 @@ name:            wai-app-static-version:         0.0.0+version:         0.0.1 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>