summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wong <lambda.fairy@gmail.com>2016-10-14 22:42:03 +1300
committerChris Wong <lambda.fairy@gmail.com>2016-10-14 23:07:04 +1300
commitccb004ba10cfcdbcc419440e5f877605896bac4c (patch)
tree1d5a8f8d14061f8bc36c610da9ccd14272a5db04 /src
parent32e34f435c7911f36acdf4a62eec1f56faf0b269 (diff)
downloadhakyll-ccb004ba10cfcdbcc419440e5f877605896bac4c.tar.gz
Update to http-conduit 2.2
The new `parseRequest` function doesn't throw on non-200 responses, so we don't need to account for these in the exception handler.
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Check.hs5
1 files changed, 2 insertions, 3 deletions
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 ()