packages feed

http-conduit-downloader 1.0.32 → 1.0.33

raw patch · 2 files changed

+15/−12 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Network/HTTP/Conduit/Downloader.hs view
@@ -346,7 +346,16 @@         let dl req firstTime = do                 r <- (timeout (dsTimeout settings * 1000000) $ C.runResourceT $ do                     r <- C.http req manager-                    let h = C.responseHeaders r+                    let c = C.responseStatus r+                        h = C.responseHeaders r+                        rdr d =+                            RawDownloadResult+                            { rdrStatus = c+                            , rdrHttpVersion = C.responseVersion r+                            , rdrHeaders = h+                            , rdrBody = d+                            , rdrCookieJar = C.responseCookieJar r+                            }                         readLen = B.foldl' (\ r d -> r * 10 + ord d - ord '0') 0                     mbb <- case lookup "Content-Length" h of                         Just l@@ -363,19 +372,13 @@ --                    liftIO $ print ("sink", mbb)                     case mbb of                         Just b -> do-                            let c = C.responseStatus r-                                d = tryDeflate h b+                            let d = tryDeflate h b                             curTime <- liftIO $ getCurrentTime                             return                                 (makeDownloadResultC curTime url c h d-                                , Just $ RawDownloadResult-                                  { rdrStatus = c-                                  , rdrHttpVersion = C.responseVersion r-                                  , rdrHeaders = h-                                  , rdrBody = d-                                  , rdrCookieJar = C.responseCookieJar r-                                  })-                        Nothing -> return (DRError "Too much data", Nothing))+                                , Just $ rdr d)+                        Nothing ->+                            return (DRError "Too much data", Just $ rdr ""))                   `E.catch`                     (fmap (Just . (, Nothing)) . httpExceptionToDR url) --                   `E.catch`
http-conduit-downloader.cabal view
@@ -1,6 +1,6 @@ cabal-version:  >= 1.6 name:           http-conduit-downloader-version:        1.0.32+version:        1.0.33 author:         Vladimir Shabanov <vshabanoff@gmail.com> maintainer:     Vladimir Shabanov <vshabanoff@gmail.com> homepage:       https://github.com/bazqux/http-conduit-downloader