on master help sign in
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.

commitccb004ba10cfcdbcc419440e5f877605896bac4c authorChris Wong <lambda.fairy@gmail.com> dateFri 14 Oct 2016, 22:42 (10 years ago) parent32e34f4
2 files changed+3−4
hakyll.cabal+1−1 src/Hakyll/Check.hs+2−3
hakyll.cabal+1−1
@@ -202,7 +202,7 @@ Library
202202
203203 If flag(checkExternal)
204204 Build-depends:
205− http-conduit >= 2.1 && < 2.2,
205+ http-conduit >= 2.2 && < 2.3,
206206 http-types >= 0.7 && < 0.10
207207 Cpp-options:
208208 -DCHECK_EXTERNAL
src/Hakyll/Check.hs+2−3
@@ -204,7 +204,7 @@ checkExternalUrl url = do
204204 result <- liftIO $ try $ do
205205 mgr <- Http.newManager Http.tlsManagerSettings
206206 runResourceT $ do
207− request <- Http.parseUrl urlToCheck
207+ request <- Http.parseRequest urlToCheck
208208 response <- Http.http (settings request) mgr
209209 let code = Http.statusCode (Http.responseStatus response)
210210 return $ code >= 200 && code < 300
@@ -236,8 +236,7 @@ checkExternalUrl url = do
236236
237237 -- Convert exception to a concise form
238238 showException e = case cast e of
239− Just (Http.StatusCodeException (Http.Status code msg) _ _) ->
240− show code ++ " " ++ unpack msg
239+ Just (Http.HttpExceptionRequest _ e') -> show e'
241240 _ -> head $ words $ show e
242241#else
243242checkExternalUrl _ = return ()