packages feed

http-conduit 1.9.4.1 → 1.9.4.2

raw patch · 4 files changed

+14/−11 lines, 4 files

Files

Network/HTTP/Conduit/Manager.hs view
@@ -65,6 +65,7 @@ import Data.Default import Data.Maybe (mapMaybe) import System.IO (Handle)+import System.Mem.Weak (addFinalizer) import Data.Conduit (($$), yield, runException)  -- | Settings for a @Manager@. Please use the 'def' function and then modify@@ -185,13 +186,15 @@     mapRef <- I.newIORef (Just Map.empty)     certCache <- I.newIORef Map.empty     _ <- forkIO $ reap mapRef certCache-    return Manager-        { mConns = mapRef-        , mMaxConns = managerConnCount ms-        , mCheckCerts = \x y -> getCertStore >>= \cs -> managerCheckCerts ms cs x y-        , mCertCache = certCache-        , mResponseTimeout = managerResponseTimeout ms-        }+    let manager = Manager+            { mConns = mapRef+            , mMaxConns = managerConnCount ms+            , mCheckCerts = \x y -> getCertStore >>= \cs -> managerCheckCerts ms cs x y+            , mCertCache = certCache+            , mResponseTimeout = managerResponseTimeout ms+            }+    addFinalizer manager $ closeManager manager+    return manager  -- | Collect and destroy any stale connections. reap :: I.IORef (Maybe (Map.Map ConnKey (NonEmptyList ConnInfo)))
Network/HTTP/Conduit/Types.hs view
@@ -236,10 +236,10 @@   , cookie_secure_only :: Bool   , cookie_http_only :: Bool   }-  deriving (Show)+  deriving (Read, Show)  newtype CookieJar = CJ { expose :: [Cookie] }-  deriving (Show)+  deriving (Read, Show)  -- This corresponds to step 11 of the algorithm described in Section 5.3 \"Storage Model\" instance Eq Cookie where
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         1.9.4.1+version:         1.9.4.2 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>
test/main.hs view
@@ -340,7 +340,7 @@             req1 <- parseUrl $ "http://localhost:" ++ show port             let req2 = req1 { responseTimeout = Just 5000000 }             withManagerSettings def { managerResponseTimeout = Just 1 } $ \man -> do-                eres1 <- try $ httpLbs req1 man+                eres1 <- try $ httpLbs req1 { NHC.path = "/delayed" } man                 case eres1 of                     Left (FailedConnectionException _ _) -> return ()                     _ -> error "Did not time out"