packages feed

hack2-contrib 2013.6.22 → 2013.7.18

raw patch · 4 files changed

+5/−6 lines, 4 filesdep ~airPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: air

API changes (from Hackage documentation)

+ Hack2.Contrib.Middleware.File: serve :: Maybe ByteString -> ByteString -> IO Response

Files

hack2-contrib.cabal view
@@ -1,5 +1,5 @@ Name:                 hack2-contrib-Version:              2013.6.22+Version:              2013.7.18 Build-type:           Simple Synopsis:             Hack2 contrib Description:          Common middlewares and utilities for Hack2@@ -27,7 +27,7 @@                   , bytestring                   , data-default                   , time-                  , air >= 2013.6.22+                  , air >= 2013.7.18                   , hack2                   , utf8-string                   
src/Hack2/Contrib/Middleware/File.hs view
@@ -4,7 +4,7 @@ -- | Stolen from rack: serves files below the +root+ given, according to the  --   path info of the Rack request. -module Hack2.Contrib.Middleware.File (file) where+module Hack2.Contrib.Middleware.File (file, serve) where  import Data.Default import Data.List (isInfixOf)
src/Hack2/Contrib/Request.hs view
@@ -69,7 +69,7 @@ params env =   if env.query_string.B.unpack.all isSpace     then []-    else env.query_string.B.unpack.formDecode.map_both B.pack+    else env.query_string.B.unpack.formDecode.map_both (u2b > B.pack)  inputs :: Env -> IO [(ByteString, ByteString)] inputs env = do
src/Hack2/Contrib/Utils.hs view
@@ -26,8 +26,7 @@  -- | usage: app.use [content_type, cache] use :: [Middleware] -> Middleware-use [] = id-use xs = xs.reduce (<<<)+use = inject id (<)  -- use the get / put helper to deal with headers put :: (Eq a) => a -> b -> [(a, b)] -> [(a, b)]