morte 1.6.2 → 1.6.3
raw patch · 2 files changed
+10/−8 lines, 2 filesdep ~http-clientdep ~http-client-tlsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: http-client, http-client-tls
API changes (from Hackage documentation)
Files
- morte.cabal +3/−3
- src/Morte/Import.hs +7/−5
morte.cabal view
@@ -1,5 +1,5 @@ Name: morte-Version: 1.6.2+Version: 1.6.3 Cabal-Version: >=1.8.0.2 Build-Type: Simple Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1@@ -40,8 +40,8 @@ containers >= 0.5.0.0 && < 0.6 , deepseq >= 1.3.0 && < 1.5 , Earley >= 0.10.1.0 && < 0.12,- http-client >= 0.4.0 && < 0.5 ,- http-client-tls >= 0.2.0 && < 0.3 ,+ http-client >= 0.5.0 && < 0.6 ,+ http-client-tls >= 0.2.0 && < 0.4 , microlens >= 0.2.0.0 && < 0.5 , microlens-mtl >= 0.1.3.1 && < 0.2 , pipes >= 4.0.0 && < 4.2 ,
src/Morte/Import.hs view
@@ -204,7 +204,9 @@ Just m -> return m Nothing -> do let settings = HTTP.tlsManagerSettings- { HTTP.managerResponseTimeout = Just 1000000 } -- 1 second+ { HTTP.managerResponseTimeout =+ HTTP.responseTimeoutMicro 1000000+ } m <- liftIO (HTTP.newManager settings) zoom manager (State.put (Just m)) return m@@ -303,11 +305,11 @@ paths <- zoom stack State.get let readURL url = do- request <- liftIO (HTTP.parseUrl (Text.unpack url))+ request <- liftIO (HTTP.parseUrlThrow (Text.unpack url)) m <- needManager let httpLbs' = do HTTP.httpLbs request m `catch` (\e -> case e of- HTTP.StatusCodeException _ _ _ -> do+ HTTP.HttpExceptionRequest _ (HTTP.StatusCodeException _ _) -> do let request' = request { HTTP.path = HTTP.path request <> "/@" } -- If the fallback fails, reuse the original@@ -346,7 +348,7 @@ -- Also try the fallback in case of a parse error, since the -- parse error might signify that this URL points to a directory -- list- request <- liftIO (HTTP.parseUrl (Text.unpack url))+ request <- liftIO (HTTP.parseUrlThrow (Text.unpack url)) let request' = request { HTTP.path = HTTP.path request <> "/@" } m <- needManager response <- liftIO@@ -364,7 +366,7 @@ loadStatic path = do paths <- zoom stack State.get - let local (URL url) = case HTTP.parseUrl (Text.unpack url) of+ let local (URL url) = case HTTP.parseUrlThrow (Text.unpack url) of Nothing -> False Just request -> case HTTP.host request of "127.0.0.1" -> True