summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelSnoyman <>2012-02-08 06:12:15 (GMT)
committerhdiff <hdiff@luite.com>2012-02-08 06:12:15 (GMT)
commit659e6c5b07203c7fedb1da4ab84ebda309c4ad42 (patch)
treedf2cd920599c8ee011767bce42979a04574aed83
parent0a5713626906ee08d1765a2f846294161b9a3304 (diff)
version 1.2.51.2.5
-rw-r--r--Network/HTTP/Conduit/ConnInfo.hs13
-rw-r--r--http-conduit.cabal8
2 files changed, 7 insertions, 14 deletions
diff --git a/Network/HTTP/Conduit/ConnInfo.hs b/Network/HTTP/Conduit/ConnInfo.hs
index 0fc70ff..91dff59 100644
--- a/Network/HTTP/Conduit/ConnInfo.hs
+++ b/Network/HTTP/Conduit/ConnInfo.hs
@@ -21,7 +21,6 @@ module Network.HTTP.Conduit.ConnInfo
import Control.Exception (SomeException, throwIO, try)
import System.IO (Handle, hClose)
-import Control.Monad (unless)
import Control.Monad.Base (MonadBase, liftBase)
@@ -35,8 +34,6 @@ import Network.Socket.ByteString (recv, sendAll)
import qualified Network.Socket as NS
import Network.Socks5 (socksConnectWith, SocksConf)
-import Network.HTTP.Conduit.Request (HttpException (HandshakeFailed))
-
import Network.TLS
import Network.TLS.Extra (ciphersuite_all)
@@ -138,8 +135,7 @@ sslClientConn _desc onCerts h = do
}
gen <- makeSystem
istate <- client tcp gen h
- handshakeRes <- handshake istate
- unless handshakeRes $ throwIO HandshakeFailed
+ handshake istate
return ConnInfo
{ connRead = recvD istate
, connWrite = sendData istate . L.fromChunks . (:[])
@@ -153,12 +149,9 @@ sslClientConn _desc onCerts h = do
where
recvD istate = do
x <- recvData istate
- if L.null x
+ if S.null x
then recvD istate
- else return $ S.concat $ L.toChunks x
- -- Although a 'concat' seems like a bad idea, at
- -- least on tls-0.8.4 it's guaranteed to always
- -- return a lazy bytestring with a single chunk.
+ else return x
getSocket :: String -> Int -> Maybe SocksConf -> IO NS.Socket
getSocket host' port' (Just socksConf) = do
diff --git a/http-conduit.cabal b/http-conduit.cabal
index 79426e7..3c97b02 100644
--- a/http-conduit.cabal
+++ b/http-conduit.cabal
@@ -1,5 +1,5 @@
name: http-conduit
-version: 1.2.4
+version: 1.2.5
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
@@ -31,11 +31,11 @@ library
, blaze-builder >= 0.2.1 && < 0.4
, http-types >= 0.6 && < 0.7
, cprng-aes >= 0.2 && < 0.3
- , tls >= 0.8.1 && < 0.9
- , tls-extra >= 0.4 && < 0.5
+ , tls >= 0.9 && < 0.10
+ , tls-extra >= 0.4.3 && < 0.5
, monad-control >= 0.3 && < 0.4
, containers >= 0.2
- , certificate >= 0.7 && < 1.1
+ , certificate >= 1.1 && < 1.2
, case-insensitive >= 0.2
, base64-bytestring >= 0.1 && < 0.2
, asn1-data >= 0.5.1 && < 0.7