packages feed

http-conduit 1.9.5 → 1.9.5.1

raw patch · 2 files changed

+15/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Network/HTTP/Conduit/Response.hs view
@@ -154,21 +154,31 @@                 (rsrc, ()) <- return () $$+ return ()                 return rsrc             else do-                let src3 =-                        if ("transfer-encoding", "chunked") `elem` hs'+                let isChunked = ("transfer-encoding", "chunked") `elem` hs'+                    src3 =+                        if isChunked                             then fmapResume ($= chunkedConduit rawBody) src2                             else                                 case mcl of                                     Just len -> fmapResume ($= requireLength len) src2                                     Nothing  -> src2-                let src4 =+                    src4 =                         if needsGunzip req hs'-                            then fmapResume ($= CZ.ungzip) src3+                            then fmapResume ($= (if isChunked then ungzipChunked else CZ.ungzip)) src3                             else src3                 return $ addCleanup' cleanup src4      return $ Response s version hs' body def   where+    -- When a body is both chunked and gzipped, we need to flush each chunk+    -- immediately to ensure streaming behavior.+    ungzipChunked =+        CL.concatMap (\x -> [Chunk x, Flush])+        =$= CZ.decompressFlush (CZ.WindowBits 31)+        =$= awaitForever unChunk+      where+        unChunk Flush = return ()+        unChunk (Chunk x) = yield x     fmapResume f (ResumableSource src m) = ResumableSource (f src) m     addCleanup' f (ResumableSource src m) = ResumableSource (addCleanup f src) (m >> f False) 
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         1.9.5+version:         1.9.5.1 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>