packages feed

wai-app-file-cgi 0.5.9 → 0.5.10

raw patch · 4 files changed

+22/−39 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Network/Wai/Application/Classic/CGI.hs view
@@ -59,8 +59,8 @@     fromCGI rhdl cspec req   where     register3 (rhdl,whdl,pid) = do-        register $ terminateProcess pid -- SIGTERM-        register $ hClose rhdl+        _ <- register $ terminateProcess pid -- SIGTERM+        _ <- register $ hClose rhdl         keyw <- register $ hClose whdl         return (rhdl,whdl,release keyw) 
Network/Wai/Application/Classic/Conduit.hs view
@@ -45,7 +45,7 @@ keyVal :: Parser RequestHeader keyVal = do     key <- takeTill (wcollon==)-    word8 wcollon+    _ <- word8 wcollon     skipWhile (wspace ==)     val <- takeTill (`elem` [wlf,wcr])     crlf
Network/Wai/Application/Classic/Path.hs view
@@ -8,11 +8,9 @@   , isSuffixOf   ) where -import qualified Blaze.ByteString.Builder as BB import Data.ByteString (ByteString)-import qualified Data.ByteString as BS (null, head, tail, last, append, drop, length, breakByte, isSuffixOf)+import qualified Data.ByteString as BS (null, head, tail, last, concat, append, drop, length, breakByte, isSuffixOf) import qualified Data.ByteString.Char8 as BS (pack, unpack)-import Data.Monoid import Data.String import Data.Word import Data.Function@@ -45,12 +43,18 @@   , pathByteString = path   } -pathDot :: Word8-pathDot = 46+-- pathDot :: Word8+-- pathDot = 46 +pathDotBS :: ByteString+pathDotBS = "."+ pathSep :: Word8 pathSep = 47 +pathSepBS :: ByteString+pathSepBS = "/"+ {-|   Checking if the path ends with the path separator. @@ -90,10 +94,7 @@ -}  (+++) :: Path -> Path -> Path-p1 +++ p2 = Path {-    pathString = BS.unpack p-  , pathByteString = p-  }+p1 +++ p2 = fromByteString p   where     p = pathByteString p1 `BS.append` pathByteString p2 @@ -113,22 +114,15 @@ (</>) :: Path -> Path -> Path p1 </> p2   | has1 && not has2 || not has1 && has2 = p1 +++ p2-  | has1      = toPath pp1-  | otherwise = toPath pp2+  | has1      = fromByteString pp1+  | otherwise = fromByteString pp2   where     has1 = hasTrailingPathSeparator p1     has2 = hasLeadingPathSeparator p2     p1' = pathByteString p1     p2' = pathByteString p2-    toPath p = Path {-        pathString = BS.unpack p-      , pathByteString = p-      }-    pp1 = BB.toByteString (BB.fromByteString p1'-                           `mappend` BB.fromByteString (BS.tail p2'))-    pp2 = BB.toByteString (BB.fromByteString p1'-                           `mappend` BB.fromWord8 pathSep-                           `mappend` BB.fromByteString p2')+    pp1 = p1' `BS.append` BS.tail p2'+    pp2 = BS.concat [p1',pathSepBS,p2']  {-|   Removing prefix. The prefix of the second argument is removed@@ -142,10 +136,7 @@ "bar" -} (<\>) :: Path -> Path -> Path-p1 <\> p2 = Path {-    pathString = BS.unpack p-  , pathByteString = p-  }+p1 <\> p2 = fromByteString p   where     p1' = pathByteString p1     p2' = pathByteString p2@@ -155,16 +146,11 @@   Adding suffix. -} (<.>) :: Path -> Path -> Path-p1 <.> p2 = Path {-    pathString = BS.unpack p-  , pathByteString = p-  }+p1 <.> p2 = fromByteString p   where     p1' = pathByteString p1     p2' = pathByteString p2-    p = BB.toByteString (BB.fromByteString p1'-                       `mappend` BB.fromWord8 pathDot-                       `mappend` BB.fromByteString p2')+    p = BS.concat [p1',pathDotBS,p2']  {-|   Breaking at the first path separator.
wai-app-file-cgi.cabal view
@@ -1,5 +1,5 @@ Name:                   wai-app-file-cgi-Version:                0.5.9+Version:                0.5.10 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3@@ -13,10 +13,7 @@ Build-Type:             Simple  Library-  if impl(ghc >= 6.12)-    GHC-Options:        -Wall -fno-warn-unused-do-bind-  else-    GHC-Options:        -Wall+  GHC-Options:          -Wall   Exposed-Modules:      Network.Wai.Application.Classic   Other-Modules:        Network.Wai.Application.Classic.CGI                         Network.Wai.Application.Classic.Conduit