packages feed

http-conduit 1.9.1 → 1.9.2

raw patch · 3 files changed

+20/−3 lines, 3 files

Files

Network/HTTP/Conduit.hs view
@@ -190,7 +190,8 @@ import qualified Network.HTTP.Types as W import Data.Default (def) -import Control.Exception.Lifted (throwIO, try, IOException, handle, fromException)+import Control.Exception.Lifted (throwIO, try, IOException, handle, fromException, toException)+import qualified Network.TLS as TLS import Control.Monad ((<=<)) import Control.Monad.IO.Class (MonadIO (liftIO)) import Control.Monad.Trans.Resource@@ -358,7 +359,22 @@ httpLbs r = wrapIOException . (lbsResponse <=< http r)  wrapIOException :: MonadBaseControl IO m => m a -> m a-wrapIOException = handle $ throwIO . InternalIOException+wrapIOException =+    handle $ throwIO . wrapper+  where+    wrapper se =+        case fromException se of+            Just e -> toException $ InternalIOException e+            Nothing ->+                case fromException se of+                    Just TLS.Terminated{} -> toException $ TlsException se+                    Nothing ->+                        case fromException se of+                            Just TLS.HandshakeFailed{} -> toException $ TlsException se+                            Nothing ->+                                case fromException se of+                                    Just TLS.ConnectionNotEstablished -> toException $ TlsException se+                                    Nothing -> se  -- | Download the specified URL, following any redirects, and -- return the response body.
Network/HTTP/Conduit/Types.hs view
@@ -192,6 +192,7 @@                    | InternalIOException IOException                    | ProxyConnectException S.ByteString Int (Either S.ByteString HttpException) -- ^ host/port                    | NoResponseDataReceived+                   | TlsException SomeException     deriving (Show, Typeable) instance Exception HttpException 
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         1.9.1+version:         1.9.2 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>