http-client 0.4.23 → 0.4.24
raw patch · 4 files changed
+13/−2 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Network.HTTP.Client: cookie_creation_time :: Cookie -> UTCTime
- Network.HTTP.Client: cookie_domain :: Cookie -> ByteString
- Network.HTTP.Client: cookie_expiry_time :: Cookie -> UTCTime
- Network.HTTP.Client: cookie_host_only :: Cookie -> Bool
- Network.HTTP.Client: cookie_http_only :: Cookie -> Bool
- Network.HTTP.Client: cookie_last_access_time :: Cookie -> UTCTime
- Network.HTTP.Client: cookie_name :: Cookie -> ByteString
- Network.HTTP.Client: cookie_path :: Cookie -> ByteString
- Network.HTTP.Client: cookie_persistent :: Cookie -> Bool
- Network.HTTP.Client: cookie_secure_only :: Cookie -> Bool
- Network.HTTP.Client: cookie_value :: Cookie -> ByteString
- Network.HTTP.Client: fileSize :: StreamFileStatus -> Int64
- Network.HTTP.Client: instance Constructor C1_0HistoriedResponse
- Network.HTTP.Client: instance Datatype D1HistoriedResponse
- Network.HTTP.Client: instance Foldable HistoriedResponse
- Network.HTTP.Client: instance Functor HistoriedResponse
- Network.HTTP.Client: instance Generic (HistoriedResponse body)
- Network.HTTP.Client: instance Selector S1_0_0HistoriedResponse
- Network.HTTP.Client: instance Selector S1_0_1HistoriedResponse
- Network.HTTP.Client: instance Selector S1_0_2HistoriedResponse
- Network.HTTP.Client: instance Show body => Show (HistoriedResponse body)
- Network.HTTP.Client: instance Traversable HistoriedResponse
- Network.HTTP.Client: instance Typeable HistoriedResponse
- Network.HTTP.Client: proxyHost :: Proxy -> ByteString
- Network.HTTP.Client: proxyPort :: Proxy -> Int
- Network.HTTP.Client: readSoFar :: StreamFileStatus -> Int64
- Network.HTTP.Client: thisChunkSize :: StreamFileStatus -> Int
- Network.HTTP.Client.Internal: checkStatus :: Request -> Status -> ResponseHeaders -> CookieJar -> Maybe SomeException
- Network.HTTP.Client.Internal: connectionClose :: Connection -> IO ()
- Network.HTTP.Client.Internal: connectionRead :: Connection -> IO ByteString
- Network.HTTP.Client.Internal: connectionUnread :: Connection -> ByteString -> IO ()
- Network.HTTP.Client.Internal: connectionWrite :: Connection -> ByteString -> IO ()
- Network.HTTP.Client.Internal: cookieJar :: Request -> Maybe CookieJar
- Network.HTTP.Client.Internal: cookie_creation_time :: Cookie -> UTCTime
- Network.HTTP.Client.Internal: cookie_domain :: Cookie -> ByteString
- Network.HTTP.Client.Internal: cookie_expiry_time :: Cookie -> UTCTime
- Network.HTTP.Client.Internal: cookie_host_only :: Cookie -> Bool
- Network.HTTP.Client.Internal: cookie_http_only :: Cookie -> Bool
- Network.HTTP.Client.Internal: cookie_last_access_time :: Cookie -> UTCTime
- Network.HTTP.Client.Internal: cookie_name :: Cookie -> ByteString
- Network.HTTP.Client.Internal: cookie_path :: Cookie -> ByteString
- Network.HTTP.Client.Internal: cookie_persistent :: Cookie -> Bool
- Network.HTTP.Client.Internal: cookie_secure_only :: Cookie -> Bool
- Network.HTTP.Client.Internal: cookie_value :: Cookie -> ByteString
- Network.HTTP.Client.Internal: decompress :: Request -> ByteString -> Bool
- Network.HTTP.Client.Internal: expose :: CookieJar -> [Cookie]
- Network.HTTP.Client.Internal: fileSize :: StreamFileStatus -> Int64
- Network.HTTP.Client.Internal: getConnectionWrapper :: Request -> Maybe Int -> HttpException -> IO (ConnRelease, Connection, ManagedConn) -> IO (Maybe Int, (ConnRelease, Connection, ManagedConn))
- Network.HTTP.Client.Internal: host :: Request -> ByteString
- Network.HTTP.Client.Internal: hostAddress :: Request -> Maybe HostAddress
- Network.HTTP.Client.Internal: mConns :: Manager -> IORef ConnsMap
- Network.HTTP.Client.Internal: mConnsBaton :: Manager -> MVar ()
- Network.HTTP.Client.Internal: mIdleConnectionCount :: Manager -> Int
- Network.HTTP.Client.Internal: mMaxConns :: Manager -> Int
- Network.HTTP.Client.Internal: mModifyRequest :: Manager -> Request -> IO Request
- Network.HTTP.Client.Internal: mRawConnection :: Manager -> Maybe HostAddress -> String -> Int -> IO Connection
- Network.HTTP.Client.Internal: mResponseTimeout :: Manager -> Maybe Int
- Network.HTTP.Client.Internal: mRetryableException :: Manager -> SomeException -> Bool
- Network.HTTP.Client.Internal: mSetProxy :: Manager -> Request -> Request
- Network.HTTP.Client.Internal: mTlsConnection :: Manager -> Maybe HostAddress -> String -> Int -> IO Connection
- Network.HTTP.Client.Internal: mTlsProxyConnection :: Manager -> ByteString -> (Connection -> IO ()) -> String -> Maybe HostAddress -> String -> Int -> IO Connection
- Network.HTTP.Client.Internal: mWrapIOException :: Manager -> forall a. IO a -> IO a
- Network.HTTP.Client.Internal: managerConnCount :: ManagerSettings -> Int
- Network.HTTP.Client.Internal: managerIdleConnectionCount :: ManagerSettings -> Int
- Network.HTTP.Client.Internal: managerModifyRequest :: ManagerSettings -> Request -> IO Request
- Network.HTTP.Client.Internal: managerProxyInsecure :: ManagerSettings -> ProxyOverride
- Network.HTTP.Client.Internal: managerProxySecure :: ManagerSettings -> ProxyOverride
- Network.HTTP.Client.Internal: managerRawConnection :: ManagerSettings -> IO (Maybe HostAddress -> String -> Int -> IO Connection)
- Network.HTTP.Client.Internal: managerResponseTimeout :: ManagerSettings -> Maybe Int
- Network.HTTP.Client.Internal: managerRetryableException :: ManagerSettings -> SomeException -> Bool
- Network.HTTP.Client.Internal: managerTlsConnection :: ManagerSettings -> IO (Maybe HostAddress -> String -> Int -> IO Connection)
- Network.HTTP.Client.Internal: managerTlsProxyConnection :: ManagerSettings -> IO (ByteString -> (Connection -> IO ()) -> String -> Maybe HostAddress -> String -> Int -> IO Connection)
- Network.HTTP.Client.Internal: managerWrapIOException :: ManagerSettings -> forall a. IO a -> IO a
- Network.HTTP.Client.Internal: method :: Request -> Method
- Network.HTTP.Client.Internal: onRequestBodyException :: Request -> SomeException -> IO ()
- Network.HTTP.Client.Internal: path :: Request -> ByteString
- Network.HTTP.Client.Internal: port :: Request -> Int
- Network.HTTP.Client.Internal: proxy :: Request -> Maybe Proxy
- Network.HTTP.Client.Internal: proxyHost :: Proxy -> ByteString
- Network.HTTP.Client.Internal: proxyPort :: Proxy -> Int
- Network.HTTP.Client.Internal: queryString :: Request -> ByteString
- Network.HTTP.Client.Internal: rawBody :: Request -> Bool
- Network.HTTP.Client.Internal: readSoFar :: StreamFileStatus -> Int64
- Network.HTTP.Client.Internal: redirectCount :: Request -> Int
- Network.HTTP.Client.Internal: requestBody :: Request -> RequestBody
- Network.HTTP.Client.Internal: requestHeaders :: Request -> RequestHeaders
- Network.HTTP.Client.Internal: requestVersion :: Request -> HttpVersion
- Network.HTTP.Client.Internal: responseBody :: Response body -> body
- Network.HTTP.Client.Internal: responseClose' :: Response body -> ResponseClose
- Network.HTTP.Client.Internal: responseCookieJar :: Response body -> CookieJar
- Network.HTTP.Client.Internal: responseHeaders :: Response body -> ResponseHeaders
- Network.HTTP.Client.Internal: responseStatus :: Response body -> Status
- Network.HTTP.Client.Internal: responseTimeout :: Request -> Maybe Int
- Network.HTTP.Client.Internal: responseVersion :: Response body -> HttpVersion
- Network.HTTP.Client.Internal: runProxyOverride :: ProxyOverride -> Bool -> IO (Request -> Request)
- Network.HTTP.Client.Internal: runResponseClose :: ResponseClose -> IO ()
- Network.HTTP.Client.Internal: secure :: Request -> Bool
- Network.HTTP.Client.Internal: thisChunkSize :: StreamFileStatus -> Int
- Network.HTTP.Client.MultipartFormData: instance Show Part
+ Network.HTTP.Client: TlsExceptionHostPort :: SomeException -> ByteString -> Int -> HttpException
+ Network.HTTP.Client: [cookie_creation_time] :: Cookie -> UTCTime
+ Network.HTTP.Client: [cookie_domain] :: Cookie -> ByteString
+ Network.HTTP.Client: [cookie_expiry_time] :: Cookie -> UTCTime
+ Network.HTTP.Client: [cookie_host_only] :: Cookie -> Bool
+ Network.HTTP.Client: [cookie_http_only] :: Cookie -> Bool
+ Network.HTTP.Client: [cookie_last_access_time] :: Cookie -> UTCTime
+ Network.HTTP.Client: [cookie_name] :: Cookie -> ByteString
+ Network.HTTP.Client: [cookie_path] :: Cookie -> ByteString
+ Network.HTTP.Client: [cookie_persistent] :: Cookie -> Bool
+ Network.HTTP.Client: [cookie_secure_only] :: Cookie -> Bool
+ Network.HTTP.Client: [cookie_value] :: Cookie -> ByteString
+ Network.HTTP.Client: [fileSize] :: StreamFileStatus -> Int64
+ Network.HTTP.Client: [proxyHost] :: Proxy -> ByteString
+ Network.HTTP.Client: [proxyPort] :: Proxy -> Int
+ Network.HTTP.Client: [readSoFar] :: StreamFileStatus -> Int64
+ Network.HTTP.Client: [thisChunkSize] :: StreamFileStatus -> Int
+ Network.HTTP.Client: instance Data.Foldable.Foldable Network.HTTP.Client.HistoriedResponse
+ Network.HTTP.Client: instance Data.Traversable.Traversable Network.HTTP.Client.HistoriedResponse
+ Network.HTTP.Client: instance GHC.Base.Functor Network.HTTP.Client.HistoriedResponse
+ Network.HTTP.Client: instance GHC.Generics.Constructor Network.HTTP.Client.C1_0HistoriedResponse
+ Network.HTTP.Client: instance GHC.Generics.Datatype Network.HTTP.Client.D1HistoriedResponse
+ Network.HTTP.Client: instance GHC.Generics.Generic (Network.HTTP.Client.HistoriedResponse body)
+ Network.HTTP.Client: instance GHC.Generics.Selector Network.HTTP.Client.S1_0_0HistoriedResponse
+ Network.HTTP.Client: instance GHC.Generics.Selector Network.HTTP.Client.S1_0_1HistoriedResponse
+ Network.HTTP.Client: instance GHC.Generics.Selector Network.HTTP.Client.S1_0_2HistoriedResponse
+ Network.HTTP.Client: instance GHC.Show.Show body => GHC.Show.Show (Network.HTTP.Client.HistoriedResponse body)
+ Network.HTTP.Client.Internal: TlsExceptionHostPort :: SomeException -> ByteString -> Int -> HttpException
+ Network.HTTP.Client.Internal: [checkStatus] :: Request -> Status -> ResponseHeaders -> CookieJar -> Maybe SomeException
+ Network.HTTP.Client.Internal: [connectionClose] :: Connection -> IO ()
+ Network.HTTP.Client.Internal: [connectionRead] :: Connection -> IO ByteString
+ Network.HTTP.Client.Internal: [connectionUnread] :: Connection -> ByteString -> IO ()
+ Network.HTTP.Client.Internal: [connectionWrite] :: Connection -> ByteString -> IO ()
+ Network.HTTP.Client.Internal: [cookieJar] :: Request -> Maybe CookieJar
+ Network.HTTP.Client.Internal: [cookie_creation_time] :: Cookie -> UTCTime
+ Network.HTTP.Client.Internal: [cookie_domain] :: Cookie -> ByteString
+ Network.HTTP.Client.Internal: [cookie_expiry_time] :: Cookie -> UTCTime
+ Network.HTTP.Client.Internal: [cookie_host_only] :: Cookie -> Bool
+ Network.HTTP.Client.Internal: [cookie_http_only] :: Cookie -> Bool
+ Network.HTTP.Client.Internal: [cookie_last_access_time] :: Cookie -> UTCTime
+ Network.HTTP.Client.Internal: [cookie_name] :: Cookie -> ByteString
+ Network.HTTP.Client.Internal: [cookie_path] :: Cookie -> ByteString
+ Network.HTTP.Client.Internal: [cookie_persistent] :: Cookie -> Bool
+ Network.HTTP.Client.Internal: [cookie_secure_only] :: Cookie -> Bool
+ Network.HTTP.Client.Internal: [cookie_value] :: Cookie -> ByteString
+ Network.HTTP.Client.Internal: [decompress] :: Request -> ByteString -> Bool
+ Network.HTTP.Client.Internal: [expose] :: CookieJar -> [Cookie]
+ Network.HTTP.Client.Internal: [fileSize] :: StreamFileStatus -> Int64
+ Network.HTTP.Client.Internal: [getConnectionWrapper] :: Request -> Maybe Int -> HttpException -> IO (ConnRelease, Connection, ManagedConn) -> IO (Maybe Int, (ConnRelease, Connection, ManagedConn))
+ Network.HTTP.Client.Internal: [hostAddress] :: Request -> Maybe HostAddress
+ Network.HTTP.Client.Internal: [host] :: Request -> ByteString
+ Network.HTTP.Client.Internal: [mConnsBaton] :: Manager -> MVar ()
+ Network.HTTP.Client.Internal: [mConns] :: Manager -> IORef ConnsMap
+ Network.HTTP.Client.Internal: [mIdleConnectionCount] :: Manager -> Int
+ Network.HTTP.Client.Internal: [mMaxConns] :: Manager -> Int
+ Network.HTTP.Client.Internal: [mModifyRequest] :: Manager -> Request -> IO Request
+ Network.HTTP.Client.Internal: [mRawConnection] :: Manager -> Maybe HostAddress -> String -> Int -> IO Connection
+ Network.HTTP.Client.Internal: [mResponseTimeout] :: Manager -> Maybe Int
+ Network.HTTP.Client.Internal: [mRetryableException] :: Manager -> SomeException -> Bool
+ Network.HTTP.Client.Internal: [mSetProxy] :: Manager -> Request -> Request
+ Network.HTTP.Client.Internal: [mTlsConnection] :: Manager -> Maybe HostAddress -> String -> Int -> IO Connection
+ Network.HTTP.Client.Internal: [mTlsProxyConnection] :: Manager -> ByteString -> (Connection -> IO ()) -> String -> Maybe HostAddress -> String -> Int -> IO Connection
+ Network.HTTP.Client.Internal: [mWrapIOException] :: Manager -> forall a. IO a -> IO a
+ Network.HTTP.Client.Internal: [managerConnCount] :: ManagerSettings -> Int
+ Network.HTTP.Client.Internal: [managerIdleConnectionCount] :: ManagerSettings -> Int
+ Network.HTTP.Client.Internal: [managerModifyRequest] :: ManagerSettings -> Request -> IO Request
+ Network.HTTP.Client.Internal: [managerProxyInsecure] :: ManagerSettings -> ProxyOverride
+ Network.HTTP.Client.Internal: [managerProxySecure] :: ManagerSettings -> ProxyOverride
+ Network.HTTP.Client.Internal: [managerRawConnection] :: ManagerSettings -> IO (Maybe HostAddress -> String -> Int -> IO Connection)
+ Network.HTTP.Client.Internal: [managerResponseTimeout] :: ManagerSettings -> Maybe Int
+ Network.HTTP.Client.Internal: [managerRetryableException] :: ManagerSettings -> SomeException -> Bool
+ Network.HTTP.Client.Internal: [managerTlsConnection] :: ManagerSettings -> IO (Maybe HostAddress -> String -> Int -> IO Connection)
+ Network.HTTP.Client.Internal: [managerTlsProxyConnection] :: ManagerSettings -> IO (ByteString -> (Connection -> IO ()) -> String -> Maybe HostAddress -> String -> Int -> IO Connection)
+ Network.HTTP.Client.Internal: [managerWrapIOException] :: ManagerSettings -> forall a. IO a -> IO a
+ Network.HTTP.Client.Internal: [method] :: Request -> Method
+ Network.HTTP.Client.Internal: [onRequestBodyException] :: Request -> SomeException -> IO ()
+ Network.HTTP.Client.Internal: [path] :: Request -> ByteString
+ Network.HTTP.Client.Internal: [port] :: Request -> Int
+ Network.HTTP.Client.Internal: [proxyHost] :: Proxy -> ByteString
+ Network.HTTP.Client.Internal: [proxyPort] :: Proxy -> Int
+ Network.HTTP.Client.Internal: [proxy] :: Request -> Maybe Proxy
+ Network.HTTP.Client.Internal: [queryString] :: Request -> ByteString
+ Network.HTTP.Client.Internal: [rawBody] :: Request -> Bool
+ Network.HTTP.Client.Internal: [readSoFar] :: StreamFileStatus -> Int64
+ Network.HTTP.Client.Internal: [redirectCount] :: Request -> Int
+ Network.HTTP.Client.Internal: [requestBody] :: Request -> RequestBody
+ Network.HTTP.Client.Internal: [requestHeaders] :: Request -> RequestHeaders
+ Network.HTTP.Client.Internal: [requestVersion] :: Request -> HttpVersion
+ Network.HTTP.Client.Internal: [responseBody] :: Response body -> body
+ Network.HTTP.Client.Internal: [responseClose'] :: Response body -> ResponseClose
+ Network.HTTP.Client.Internal: [responseCookieJar] :: Response body -> CookieJar
+ Network.HTTP.Client.Internal: [responseHeaders] :: Response body -> ResponseHeaders
+ Network.HTTP.Client.Internal: [responseStatus] :: Response body -> Status
+ Network.HTTP.Client.Internal: [responseTimeout] :: Request -> Maybe Int
+ Network.HTTP.Client.Internal: [responseVersion] :: Response body -> HttpVersion
+ Network.HTTP.Client.Internal: [runProxyOverride] :: ProxyOverride -> Bool -> IO (Request -> Request)
+ Network.HTTP.Client.Internal: [runResponseClose] :: ResponseClose -> IO ()
+ Network.HTTP.Client.Internal: [secure] :: Request -> Bool
+ Network.HTTP.Client.Internal: [thisChunkSize] :: StreamFileStatus -> Int
+ Network.HTTP.Client.MultipartFormData: instance GHC.Show.Show Network.HTTP.Client.MultipartFormData.Part
Files
- ChangeLog.md +4/−0
- Network/HTTP/Client/Core.hs +4/−1
- Network/HTTP/Client/Types.hs +4/−0
- http-client.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.4.24++* Use a new `TlsExceptionHostPort` exception to indicate the host and port of the server we were trying to connect to when a TLS exception occurred. See [commercialhaskell/stack#1010](https://github.com/commercialhaskell/stack/issues/1010)+ ## 0.4.23 * Case insensitive cookie domains [#158](https://github.com/snoyberg/http-client/issues/158)
Network/HTTP/Client/Core.hs view
@@ -146,13 +146,16 @@ -- -- Since 0.1.0 responseOpen :: Request -> Manager -> IO (Response BodyReader)-responseOpen req0 manager = mWrapIOException manager $ do+responseOpen req0 manager = handle addTlsHostPort $ mWrapIOException manager $ do res <- if redirectCount req0 == 0 then httpRaw req0 manager else go (redirectCount req0) req0 maybe (return res) throwIO =<< applyCheckStatus req0 (checkStatus req0) res where+ addTlsHostPort (TlsException e) = throwIO $ TlsExceptionHostPort e (host req0) (port req0)+ addTlsHostPort e = throwIO e+ go count req' = httpRedirect count (\req -> do
Network/HTTP/Client/Types.hs view
@@ -133,6 +133,10 @@ -- and @transfer-encoding: chunked@ are used. Since 0.4.8. -- -- Since 0.4.11 this exception isn't thrown anymore.+ | TlsExceptionHostPort SomeException S.ByteString Int+ -- ^ TLS exception, together with the host and port+ --+ -- @since 0.4.24 deriving (Show, T.Typeable) instance Exception HttpException
http-client.cabal view
@@ -1,5 +1,5 @@ name: http-client-version: 0.4.23+version: 0.4.24 synopsis: An HTTP client engine, intended as a base layer for more user-friendly packages. description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/http-client>. homepage: https://github.com/snoyberg/http-client