summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelSnoyman <>2013-01-27 16:25:33 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2013-01-27 16:25:33 (GMT)
commit293f2d47cc6d58fe011836b4a3544e4fb484dc68 (patch)
treea8435f520bdbfd97cd1cc615bfd3705a34a1d4b2
parent1a1365c7baca12bd0d99c8552ee7ae03b5f4d3f8 (diff)
version 1.8.7.11.8.7.1
-rw-r--r--Network/HTTP/Conduit.hs2
-rw-r--r--Network/HTTP/Conduit/ConnInfo.hs9
-rw-r--r--Network/HTTP/Conduit/Manager.hs4
-rw-r--r--Network/HTTP/Conduit/MultipartFormData.hs3
-rw-r--r--http-conduit.cabal4
5 files changed, 15 insertions, 7 deletions
diff --git a/Network/HTTP/Conduit.hs b/Network/HTTP/Conduit.hs
index 6390a46..106cf2c 100644
--- a/Network/HTTP/Conduit.hs
+++ b/Network/HTTP/Conduit.hs
@@ -130,6 +130,8 @@ module Network.HTTP.Conduit
, alwaysDecompress
, browserDecompress
-- * Request bodies
+ -- | "Network.HTTP.Conduit.MultipartFormData" provides an API for building
+ -- form-data request bodies.
, urlEncodedBody
-- * Exceptions
, HttpException (..)
diff --git a/Network/HTTP/Conduit/ConnInfo.hs b/Network/HTTP/Conduit/ConnInfo.hs
index 3d2cb28..82f3f99 100644
--- a/Network/HTTP/Conduit/ConnInfo.hs
+++ b/Network/HTTP/Conduit/ConnInfo.hs
@@ -120,12 +120,15 @@ socketConn _desc sock = do
sClose sock
}
-sslClientConn :: String -> ([X509] -> IO CertificateUsage) -> [(X509, Maybe PrivateKey)] -> Handle -> IO ConnInfo
-sslClientConn _desc onCerts clientCerts h = do
+sslClientConn :: String -> String -> ([X509] -> IO CertificateUsage) -> [(X509, Maybe PrivateKey)] -> Handle -> IO ConnInfo
+sslClientConn _desc host onCerts clientCerts h = do
#if DEBUG
i <- addSocket _desc
#endif
- let setCParams cparams = cparams { onCertificateRequest = const (return clientCerts) }
+ let setCParams cparams = cparams
+ { onCertificateRequest = const (return clientCerts)
+ , clientUseServerName = Just host
+ }
tcp = updateClientParams setCParams $ defaultParamsClient
{ pConnectVersion = TLS10
, pAllowedVersions = [ TLS10, TLS11, TLS12 ]
diff --git a/Network/HTTP/Conduit/Manager.hs b/Network/HTTP/Conduit/Manager.hs
index edef76c..c0ffcae 100644
--- a/Network/HTTP/Conduit/Manager.hs
+++ b/Network/HTTP/Conduit/Manager.hs
@@ -319,7 +319,7 @@ getSslConn :: MonadResource m
-> m (ConnRelease m, ConnInfo, ManagedConn)
getSslConn checkCert clientCerts man host' port' socksProxy' =
getManagedConn man (ConnKey (T.pack host') port' True) $
- (connectionTo host' (PortNumber $ fromIntegral port') socksProxy' >>= sslClientConn desc checkCert clientCerts)
+ (connectionTo host' (PortNumber $ fromIntegral port') socksProxy' >>= sslClientConn desc host' checkCert clientCerts)
where
desc = socketDesc host' port' "secured"
@@ -336,7 +336,7 @@ getSslProxyConn
-> m (ConnRelease m, ConnInfo, ManagedConn)
getSslProxyConn checkCert clientCerts thost tport man phost pport socksProxy' =
getManagedConn man (ConnKey (T.pack phost) pport True) $
- doConnect >>= sslClientConn desc checkCert clientCerts
+ doConnect >>= sslClientConn desc phost checkCert clientCerts
where
desc = socketDesc phost pport "secured-proxy"
doConnect = do
diff --git a/Network/HTTP/Conduit/MultipartFormData.hs b/Network/HTTP/Conduit/MultipartFormData.hs
index e3f5d22..0cf363b 100644
--- a/Network/HTTP/Conduit/MultipartFormData.hs
+++ b/Network/HTTP/Conduit/MultipartFormData.hs
@@ -128,6 +128,9 @@ partFileSourceChunked n f =
-- | Construct a 'Part' from form name, filepath and a 'RequestBody'
--
-- > partFileRequestBody "who_calls" "caller.json" $ RequestBodyBS "{\"caller\":\"Jason J Jason\"}"
+--
+-- > -- empty upload form
+-- > partFileRequestBody "file" mempty mempty
partFileRequestBody :: (Monad m, Monad m') => Text -> FilePath -> RequestBody m' -> Part m m'
partFileRequestBody n f rqb =
partFileRequestBodyM n f $ return rqb
diff --git a/http-conduit.cabal b/http-conduit.cabal
index 078a5ad..208f935 100644
--- a/http-conduit.cabal
+++ b/http-conduit.cabal
@@ -1,5 +1,5 @@
name: http-conduit
-version: 1.8.7
+version: 1.8.7.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
@@ -57,7 +57,7 @@ library
, regex-compat
, mtl
, deepseq
- , array >= 0.4
+ , array >= 0.3
, random
, filepath
if flag(network-bytestring)