happstack-fastcgi 0.1.2 → 0.1.3
raw patch · 2 files changed
+5/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
happstack-fastcgi.cabal view
@@ -1,5 +1,5 @@ Name: happstack-fastcgi-Version: 0.1.2+Version: 0.1.3 Copyright: Tupil Maintainer: ce [at] tupil.com, eml [at] tupil.com License: BSD3
src/Happstack/Server/FastCGI.hs view
@@ -15,6 +15,7 @@ ) where +import Codec.Binary.UTF8.String import Control.Applicative import Data.Char (toLower) import Data.List (isPrefixOf)@@ -34,7 +35,6 @@ serverPartToCGI :: (ToMessage b) => ServerPartT IO b -> CGI CGIResult serverPartToCGI = convert . processRequest - convert :: (Request -> IO Response) -> CGI CGIResult convert f = cgiGet id >>= toHappstackRequest @@ -75,11 +75,11 @@ (?) :: CGIRequest -> String -> Maybe String r ? k = M.lookup k $ cgiVars r --- | Like fromJust, but with a default value in case of Nothing.+-- | Like fromJust, but with a default value in case of Nothing withDef x = maybe x id --- | Look up a String in the cgiVars, returning the empty string if the key is not present-str k v = withDef "" (v ? k)+-- | Look up a String in the cgiVars, returning the empty string if the key is not present, also does UTF8 decoding+str k v = withDef "" (v ? k >>= return . decodeString) -- | Append if the list is not empty x ?: [] = []