summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelSnoyman <>2013-12-04 12:15:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2013-12-04 12:15:00 (GMT)
commit312ca0b0e78fd634bb61ae06f8c12573c4c08b21 (patch)
treef907265fd645f6b433453f54b1957326fb497c41
parent12591e7f924f32e49d8b4ce5ca05644adfe23fae (diff)
version 2.0.0.12.0.0.1
-rw-r--r--Network/HTTP/Conduit.hs15
-rw-r--r--http-conduit.cabal2
2 files changed, 14 insertions, 3 deletions
diff --git a/Network/HTTP/Conduit.hs b/Network/HTTP/Conduit.hs
index aa73b06..2285cf3 100644
--- a/Network/HTTP/Conduit.hs
+++ b/Network/HTTP/Conduit.hs
@@ -181,7 +181,10 @@ module Network.HTTP.Conduit
, HttpException (..)
) where
+import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
+import Data.Conduit (ResumableSource, ($$+-))
+import qualified Data.Conduit.List as CL
import Control.Applicative ((<$>))
import Control.Exception.Lifted (bracket)
@@ -199,8 +202,7 @@ import Network.HTTP.Client.Internal (Manager, ManagerSettings,
import Network.HTTP.Client (parseUrl, urlEncodedBody, applyBasicAuth)
import Network.HTTP.Client.Internal (addProxy, alwaysDecompress,
browserDecompress)
-import Network.HTTP.Client.Internal (getRedirectedRequest,
- lbsResponse)
+import Network.HTTP.Client.Internal (getRedirectedRequest)
import Network.HTTP.Client.TLS (mkManagerSettings,
tlsManagerSettings)
import Network.HTTP.Client.Internal (Cookie (..), CookieJar (..),
@@ -267,3 +269,12 @@ withManagerSettings set f = bracket
setConnectionClose :: Request -> Request
setConnectionClose req = req{requestHeaders = ("Connection", "close") : requestHeaders req}
+
+lbsResponse :: Monad m
+ => Response (ResumableSource m S.ByteString)
+ -> m (Response L.ByteString)
+lbsResponse res = do
+ bss <- responseBody res $$+- CL.consume
+ return res
+ { responseBody = L.fromChunks bss
+ }
diff --git a/http-conduit.cabal b/http-conduit.cabal
index 820aaae..6bed4e5 100644
--- a/http-conduit.cabal
+++ b/http-conduit.cabal
@@ -1,5 +1,5 @@
name: http-conduit
-version: 2.0.0
+version: 2.0.0.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>