packages feed

http-conduit 1.0.0 → 1.0.0.1

raw patch · 3 files changed

+11/−10 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Network/HTTP/Conduit/Response.hs view
@@ -67,9 +67,9 @@     ((_, sc, sm), hs) <- bsrc C.$$ sinkHeaders     let s = W.Status sc sm     let hs' = map (first CI.mk) hs-    let mcl = lookup "content-length" hs'+    let mcl = lookup "content-length" hs' >>= readDec . S8.unpack     -- RFC 2616 section 4.4_1 defines responses that must not include a body-    res <- if hasNoBody method sc+    res <- if hasNoBody method sc || mcl == Just 0         then do             bsrcNull <- C.bufferSource $ CL.sourceList []             bodyStep s hs' bsrcNull@@ -78,7 +78,7 @@                 if ("transfer-encoding", "chunked") `elem` hs'                     then C.bufferSource $ bsrc C.$= chunkedConduit rawBody                     else-                        case mcl >>= readDec . S8.unpack of+                        case mcl of                             Just len -> C.bufferSource $ bsrc C.$= CB.isolate len                             Nothing  -> return bsrc             bsrc'' <-
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         1.0.0+version:         1.0.0.1 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>
test.hs view
@@ -7,24 +7,25 @@ import System.Environment.UTF8 (getArgs) import Data.CaseInsensitive (original) import Data.Conduit+import Control.Monad.IO.Class  main :: IO () main = withSocketsDo $ do     [url] <- getArgs     _req2 <- parseUrl url-    {--    let req = urlEncodedBody+    let req = {-urlEncodedBody                 [ ("foo", "bar")                 , ("baz%%38**.8fn", "bin")-                ] _req2-    -}+                ]-} _req2+                    { method = "OPTIONS"+                    }     runResourceT $ do         man <- newManager-        Response sc hs b <- httpLbsRedirect _req2 man+        Response sc hs b <- httpLbsRedirect req man #if DEBUG         return () #else-        liftBase $ do+        liftIO $ do             print sc             mapM_ (\(x, y) -> do                 S.putStr $ original x