packages feed

hack-handler-cgi 0.0.3 → 0.2.0

raw patch · 3 files changed

+19/−8 lines, 3 filesdep −data-defaultdep ~bytestringdep ~hackPVP ok

version bump matches the API change (PVP)

Dependencies removed: data-default

Dependency ranges changed: bytestring, hack

API changes (from Hackage documentation)

Files

Hack/Handler/CGI.hs view
@@ -4,13 +4,13 @@     ) where  import Hack-import Data.Default import System.Environment (getEnvironment) import Data.Maybe (fromMaybe) import qualified Data.ByteString.Lazy as BS import Data.Word (Word8) import Control.Arrow (first) import Data.Char (toLower)+import qualified System.IO  safeRead :: Read a => a -> String -> a safeRead d s =@@ -39,7 +39,13 @@         servername = lookup' "SERVER_NAME" vars         serverport = safeRead 80 $ lookup' "SERVER_PORT" vars         contentLength = safeRead 0 $ lookup' "CONTENT_LENGTH" vars-    let env = def+        remoteHost' = safeRead "" $ lookup' "REMOTE_HOST" vars+        urlScheme =+            case map toLower $ safeRead "HTTP"+                             $ lookup' "SERVER_PROTOCOL" vars of+                "https" -> HTTPS+                _ -> HTTP+    let env = Env             { requestMethod = rmethod             , scriptName = sname             , pathInfo = pinfo@@ -47,7 +53,13 @@             , serverName = servername             , serverPort = serverport             , http = map (first cleanupVarName) vars+            , hackVersion = [2009, 10, 30]+            , hackUrlScheme = urlScheme             , hackInput = BS.take contentLength body'+            , hackErrors = System.IO.hPutStr System.IO.stderr+            , hackHeaders = []+            , hackCache = []+            , remoteHost = remoteHost'             }     res <- app env     let h = headers res
LICENSE view
@@ -1,7 +1,7 @@ The following license covers this documentation, and the source code, except where otherwise indicated. -Copyright 2008, Michael Snoyman. All rights reserved.+Copyright 2009, Michael Snoyman. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
hack-handler-cgi.cabal view
@@ -1,10 +1,10 @@ name:            hack-handler-cgi-version:         0.0.3+version:         0.2.0 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com> maintainer:      Michael Snoyman <michael@snoyman.com>-synopsis:        Hack handler using network.cgi+synopsis:        Hack handler using CGI protocol. category:        Web stability:       stable cabal-version:   >= 1.2@@ -13,8 +13,7 @@  library     build-depends:   base >= 4 && < 5,-                     bytestring,-                     hack >= 2009.5.19,-                     data-default+                     bytestring >= 0.9.1.4 && < 0.10,+                     hack == 2009.10.30     exposed-modules: Hack.Handler.CGI     ghc-options:     -Wall