on master help sign in
Update to http-conduit 2.2
ccb004bChris Wong
hakyll.cabal+1−1
@@ -202,7 +202,7 @@ Library
202
202
203 If flag(checkExternal)
203 If flag(checkExternal)
204 Build-depends:
204 Build-depends:
205− http-conduit >= 2.1 && < 2.2,
205+ http-conduit >= 2.2 && < 2.3,
206 http-types >= 0.7 && < 0.10
206 http-types >= 0.7 && < 0.10
207 Cpp-options:
207 Cpp-options:
208 -DCHECK_EXTERNAL
208 -DCHECK_EXTERNAL
src/Hakyll/Check.hs+2−3
@@ -204,7 +204,7 @@ checkExternalUrl url = do
204 result <- liftIO $ try $ do
204 result <- liftIO $ try $ do
205 mgr <- Http.newManager Http.tlsManagerSettings
205 mgr <- Http.newManager Http.tlsManagerSettings
206 runResourceT $ do
206 runResourceT $ do
207− request <- Http.parseUrl urlToCheck
207+ request <- Http.parseRequest urlToCheck
208 response <- Http.http (settings request) mgr
208 response <- Http.http (settings request) mgr
209 let code = Http.statusCode (Http.responseStatus response)
209 let code = Http.statusCode (Http.responseStatus response)
210 return $ code >= 200 && code < 300
210 return $ code >= 200 && code < 300
@@ -236,8 +236,7 @@ checkExternalUrl url = do
236
236
237 -- Convert exception to a concise form
237 -- Convert exception to a concise form
238 showException e = case cast e of
238 showException e = case cast e of
239− Just (Http.StatusCodeException (Http.Status code msg) _ _) ->
239+ Just (Http.HttpExceptionRequest _ e') -> show e'
240− show code ++ " " ++ unpack msg
241 _ -> head $ words $ show e
240 _ -> head $ words $ show e
242#else
241#else
243checkExternalUrl _ = return ()
242checkExternalUrl _ = return ()