http-conduit-downloader 1.0.18 → 1.0.19
raw patch · 2 files changed
+9/−4 lines, 2 filesdep ~http-clientdep ~http-conduit
Dependency ranges changed: http-client, http-conduit
Files
Network/HTTP/Conduit/Downloader.hs view
@@ -271,7 +271,7 @@ (_, m) <- C.allocate (C.newManager $ dsManagerSettings s) C.closeManager liftIO $ f (Downloader m s) -parseUrl :: String -> Either C.HttpException C.Request+parseUrl :: String -> Either E.SomeException C.Request parseUrl = C.parseUrl . takeWhile (/= '#') -- | Perform download@@ -307,7 +307,9 @@ -> IO DownloadResult downloadG f (Downloader {..}) url hostAddress opts = case parseUrl url of- Left e -> httpExceptionToDR url e+ Left e ->+ maybe (return $ DRError $ show e) (httpExceptionToDR url)+ (E.fromException e) Right rq -> do let rq1 = rq { C.requestHeaders = [("Accept", "*/*")@@ -402,6 +404,9 @@ C.OverlongHeaders -> DRError "Overlong HTTP headers" C.ResponseTimeout -> DRError "Timeout" C.FailedConnectionException _host _port -> DRError "Connection failed"+ C.FailedConnectionException2 _ _ _ _ -> DRError "Connection failed"+ C.InvalidDestinationHost _ -> DRError "Invalid destination host"+ C.HttpZlibException e -> DRError $ "Zlib exception " ++ show e C.ExpectedBlankAfter100Continue -> DRError "Expected blank after 100 (Continue)" C.InvalidStatusLine l -> DRError $ "Invalid HTTP status line:\n" ++ B.unpack l C.NoResponseDataReceived -> DRError "No response data received"
http-conduit-downloader.cabal view
@@ -1,6 +1,6 @@ cabal-version: >= 1.6 name: http-conduit-downloader-version: 1.0.18+version: 1.0.19 author: Vladimir Shabanov <vshabanoff@gmail.com> maintainer: Vladimir Shabanov <vshabanoff@gmail.com> homepage: https://github.com/bazqux/http-conduit-downloader@@ -41,7 +41,7 @@ library build-depends:- base == 4.*, http-conduit >= 2.0.0.4, http-client, connection, network, zlib, lifted-base,+ base == 4.*, http-conduit >= 2.1.2.3, http-client >= 0.3.4, connection, network, zlib, lifted-base, conduit, resourcet, http-types, data-default, bytestring, mtl, time, old-locale, HsOpenSSL