http-client 0.3.0 → 0.3.0.1
raw patch · 3 files changed
+13/−8 lines, 3 filesdep +streaming-commonsdep −failuredep ~zlib-bindings
Dependencies added: streaming-commons
Dependencies removed: failure
Dependency ranges changed: zlib-bindings
Files
- Network/HTTP/Client/Body.hs +6/−5
- Network/HTTP/Client/Types.hs +5/−0
- http-client.cabal +2/−3
Network/HTTP/Client/Body.hs view
@@ -19,7 +19,7 @@ import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L import Control.Monad (unless, when)-import qualified Codec.Zlib as Z+import qualified Data.Streaming.Zlib as Z brReadSome :: BodyReader -> Int -> IO L.ByteString brReadSome BodyReader {..} =@@ -66,18 +66,19 @@ inf <- Z.initInflate $ Z.WindowBits 31 istate <- newIORef Nothing let goPopper popper = do- mbs <- popper- case mbs of- Just bs -> do+ res <- popper+ case res of+ Z.PRNext bs -> do writeIORef istate $ Just popper return bs- Nothing -> do+ Z.PRDone -> do bs <- Z.flushInflate inf if S.null bs then start else do writeIORef istate Nothing return bs+ Z.PRError e -> throwIO $ HttpZlibException e start = do bs <- brRead br if S.null bs
Network/HTTP/Client/Types.hs view
@@ -48,6 +48,7 @@ import qualified Data.IORef as I import qualified Data.Map as Map import Data.Text (Text)+import Data.Streaming.Zlib (ZlibException) -- | An abstraction for representing an incoming response body coming from the -- server. Data provided by this abstraction has already been gunzipped and@@ -104,6 +105,10 @@ -- Since 1.9.4 | IncompleteHeaders | InvalidDestinationHost S.ByteString+ | HttpZlibException ZlibException+ -- ^+ --+ -- Since 0.3 deriving (Show, T.Typeable) instance Exception HttpException
http-client.cabal view
@@ -1,5 +1,5 @@ name: http-client-version: 0.3.0+version: 0.3.0.1 synopsis: An HTTP client engine, intended as a base layer for more user-friendly packages. description: This codebase has been refactored from http-conduit. homepage: https://github.com/snoyberg/http-client@@ -34,7 +34,7 @@ , data-default-class , time >= 1.2 , network >= 2.3- , zlib-bindings >= 0.1 && <0.2+ , streaming-commons >= 0.1.0.2 && < 0.2 , containers , transformers , deepseq >= 1.3 && <1.4@@ -73,7 +73,6 @@ , transformers , deepseq , case-insensitive- , failure , base64-bytestring , zlib , async