summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hakyll.cabal2
-rw-r--r--src/Hakyll/Check.hs5
2 files changed, 3 insertions, 4 deletions
diff --git a/hakyll.cabal b/hakyll.cabal
index 44a09e5..c66524e 100644
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -202,7 +202,7 @@ Library
If flag(checkExternal)
Build-depends:
- http-conduit >= 2.1 && < 2.2,
+ http-conduit >= 2.2 && < 2.3,
http-types >= 0.7 && < 0.10
Cpp-options:
-DCHECK_EXTERNAL
diff --git a/src/Hakyll/Check.hs b/src/Hakyll/Check.hs
index c917f3a..b41b40e 100644
--- a/src/Hakyll/Check.hs
+++ b/src/Hakyll/Check.hs
@@ -204,7 +204,7 @@ checkExternalUrl url = do
result <- liftIO $ try $ do
mgr <- Http.newManager Http.tlsManagerSettings
runResourceT $ do
- request <- Http.parseUrl urlToCheck
+ request <- Http.parseRequest urlToCheck
response <- Http.http (settings request) mgr
let code = Http.statusCode (Http.responseStatus response)
return $ code >= 200 && code < 300
@@ -236,8 +236,7 @@ checkExternalUrl url = do
-- Convert exception to a concise form
showException e = case cast e of
- Just (Http.StatusCodeException (Http.Status code msg) _ _) ->
- show code ++ " " ++ unpack msg
+ Just (Http.HttpExceptionRequest _ e') -> show e'
_ -> head $ words $ show e
#else
checkExternalUrl _ = return ()