wai-extra 0.4.1.2 → 0.4.2
raw patch · 3 files changed
+10/−10 lines, 3 filesdep +hspecdep −test-frameworkdep −test-framework-hunit
Dependencies added: hspec
Dependencies removed: test-framework, test-framework-hunit
Files
- Network/Wai/Handler/CGI.hs +7/−6
- Network/Wai/Middleware/Debug.hs +1/−1
- wai-extra.cabal +2/−3
Network/Wai/Handler/CGI.hs view
@@ -147,16 +147,17 @@ Just _ -> h cleanupVarName :: String -> CI.CI B.ByteString-cleanupVarName ('H':'T':'T':'P':'_':a:as) =- String.fromString $ a : helper' as+cleanupVarName "CONTENT_TYPE" = "Content-Type"+cleanupVarName "CONTENT_LENGTH" = "Content-Length"+cleanupVarName "SCRIPT_NAME" = "CGI-Script-Name"+cleanupVarName s =+ case s of+ 'H':'T':'T':'P':'_':a:as -> String.fromString $ a : helper' as+ _ -> String.fromString s -- FIXME remove? where helper' ('_':x:rest) = '-' : x : helper' rest helper' (x:rest) = toLower x : helper' rest helper' [] = []-cleanupVarName "CONTENT_TYPE" = "Content-Type"-cleanupVarName "CONTENT_LENGTH" = "Content-Length"-cleanupVarName "SCRIPT_NAME" = "CGI-Script-Name"-cleanupVarName x = String.fromString x -- FIXME remove? requestBodyHandle :: Handle -> Int -> Enumerator B.ByteString IO a requestBodyHandle h =
Network/Wai/Middleware/Debug.hs view
@@ -45,7 +45,7 @@ where paramsToStr prefix params = if null params then "" else "\n" ++ prefix ++ (show params) - allPostParams req body = run_ $ enumList 1 body $$ parseRequestBody lbsSink req+ allPostParams req' body = run_ $ enumList 1 body $$ parseRequestBody lbsSink req' emptyGetParam :: (S.ByteString, Maybe S.ByteString) -> (S.ByteString, S.ByteString) emptyGetParam (k, Just v) = (k,v)
wai-extra.cabal view
@@ -1,5 +1,5 @@ Name: wai-extra-Version: 0.4.1.2+Version: 0.4.2 Synopsis: Provides some basic WAI handlers and middleware. Description: The goal here is to provide common features without many dependencies. License: BSD3@@ -51,8 +51,7 @@ build-depends: base >= 4 && < 5 , wai-extra , wai-test- , test-framework- , test-framework-hunit+ , hspec >= 0.6.1 && < 0.7 , HUnit , wai