diff options
-rw-r--r-- | Utility/Url.hs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs index 19568fda8..c53ed5c6a 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -12,6 +12,7 @@ module Utility.Url ( closeManager, + managerSettings, URLString, UserAgent, UrlOptions, @@ -48,6 +49,13 @@ closeManager :: Manager -> IO () closeManager _ = return () #endif +managerSettings :: ManagerSettings +#if MIN_VERSION_http_conduit(2,1,7) +managerSettings = tlsManagerSettings +#else +managerSettings = conduitManagerSettings +#endif + type URLString = String type Headers = [String] @@ -176,12 +184,7 @@ getUrlInfo url uo = case parseURIRelaxed url of filter (\p -> fst p == h) . responseHeaders existsconduit req = do - mgr <- newManager -#if MIN_VERSION_http_conduit(2,1,7) - tlsManagerSettings -#else - conduitManagerSettings -#endif + mgr <- newManager managerSettings let req' = headRequest (applyRequest uo req) ret <- runResourceT $ do resp <- http req' mgr |