Hello community, here is the log from the commit of package ghc-http-conduit for openSUSE:Leap:15.2 checked in at 2020-02-19 18:39:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/ghc-http-conduit (Old) and /work/SRC/openSUSE:Leap:15.2/.ghc-http-conduit.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-conduit" Wed Feb 19 18:39:31 2020 rev:12 rq:771344 version:2.3.7.3 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/ghc-http-conduit/ghc-http-conduit.changes 2020-01-15 15:02:10.497802270 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.ghc-http-conduit.new.26092/ghc-http-conduit.changes 2020-02-19 18:39:32.278067057 +0100 @@ -1,0 +2,55 @@ +Fri Nov 8 16:13:59 UTC 2019 - Peter Simons <[email protected]> + +- Drop obsolete group attributes. + +------------------------------------------------------------------- +Thu Oct 10 10:02:33 UTC 2019 - [email protected] + +- Update http-conduit to version 2.3.7.3. + ## 2.3.7.3 + + * Relax test suite version bounds + +------------------------------------------------------------------- +Tue Oct 8 02:02:21 UTC 2019 - [email protected] + +- Update http-conduit to version 2.3.7.2. + ## 2.3.7.2 + + * Add the `network3` flag + +------------------------------------------------------------------- +Wed May 1 02:03:21 UTC 2019 - [email protected] + +- Update http-conduit to version 2.3.7.1. + ## 2.3.7.1 + + * Properly skip whitespace after JSON body [#401](https://github.com/snoyberg/http-client/issues/401) + +------------------------------------------------------------------- +Wed Apr 3 02:01:29 UTC 2019 - [email protected] + +- Update http-conduit to version 2.3.7. + ## 2.3.7 + + * Ensure entire JSON response body is consumed [#395](https://github.com/snoyberg/http-client/issues/395) + +------------------------------------------------------------------- +Wed Mar 13 11:03:16 UTC 2019 - [email protected] + +- Update http-conduit to version 2.3.6.1. + # ChangeLog for http-conduit + + ## 2.3.6.1 + + * Add back compatibility with older http-client version [#393](https://github.com/snoyberg/http-client/pull/393) + +------------------------------------------------------------------- +Tue Mar 12 03:02:38 UTC 2019 - [email protected] + +- Update http-conduit to version 2.3.6. + ## 2.3.6 + + * Add `httpSource` to `Network.HTTP.Client.Conduit` [#390](https://github.com/snoyberg/http-client/pull/390). + +------------------------------------------------------------------- Old: ---- http-conduit-2.3.5.tar.gz http-conduit.cabal New: ---- http-conduit-2.3.7.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-http-conduit.spec ++++++ --- /var/tmp/diff_new_pack.uA73Ji/_old 2020-02-19 18:39:32.638067499 +0100 +++ /var/tmp/diff_new_pack.uA73Ji/_new 2020-02-19 18:39:32.646067508 +0100 @@ -19,16 +19,15 @@ %global pkg_name http-conduit %bcond_with tests Name: ghc-%{pkg_name} -Version: 2.3.5 +Version: 2.3.7.3 Release: 0 Summary: HTTP client package with conduit interface and HTTPS support License: BSD-2-Clause -Group: Development/Libraries/Haskell URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel +BuildRequires: ghc-attoparsec-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-conduit-devel BuildRequires: ghc-conduit-extra-devel @@ -67,7 +66,6 @@ %package devel Summary: Haskell %{pkg_name} library development files -Group: Development/Libraries/Haskell Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} @@ -78,7 +76,6 @@ %prep %setup -q -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ http-conduit-2.3.5.tar.gz -> http-conduit-2.3.7.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-conduit-2.3.5/ChangeLog.md new/http-conduit-2.3.7.3/ChangeLog.md --- old/http-conduit-2.3.5/ChangeLog.md 2019-01-28 18:33:22.000000000 +0100 +++ new/http-conduit-2.3.7.3/ChangeLog.md 2019-10-10 06:02:46.000000000 +0200 @@ -1,3 +1,29 @@ +# ChangeLog for http-conduit + +## 2.3.7.3 + +* Relax test suite version bounds + +## 2.3.7.2 + +* Add the `network3` flag + +## 2.3.7.1 + +* Properly skip whitespace after JSON body [#401](https://github.com/snoyberg/http-client/issues/401) + +## 2.3.7 + +* Ensure entire JSON response body is consumed [#395](https://github.com/snoyberg/http-client/issues/395) + +## 2.3.6.1 + +* Add back compatibility with older http-client version [#393](https://github.com/snoyberg/http-client/pull/393) + +## 2.3.6 + +* Add `httpSource` to `Network.HTTP.Client.Conduit` [#390](https://github.com/snoyberg/http-client/pull/390). + ## 2.3.5 * Adds `addToRequestQueryString` helper function diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-conduit-2.3.5/Network/HTTP/Client/Conduit.hs new/http-conduit-2.3.7.3/Network/HTTP/Client/Conduit.hs --- old/http-conduit-2.3.5/Network/HTTP/Client/Conduit.hs 2018-04-09 15:40:11.000000000 +0200 +++ new/http-conduit-2.3.7.3/Network/HTTP/Client/Conduit.hs 2019-03-11 11:24:39.000000000 +0100 @@ -15,6 +15,7 @@ , responseOpen , responseClose , acquireResponse + , httpSource -- * Manager helpers , defaultManagerSettings , newManager @@ -31,13 +32,14 @@ import Control.Monad (unless) import Control.Monad.IO.Unlift (MonadIO, liftIO, MonadUnliftIO, withRunInIO) -import Control.Monad.Reader (MonadReader (..)) +import Control.Monad.Reader (MonadReader (..), runReaderT) +import Control.Monad.Trans.Resource (MonadResource) import Data.Acquire (Acquire, mkAcquire, with) import Data.ByteString (ByteString) import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L -import Data.Conduit (ConduitM, ($$+), - await, yield, ($$++)) +import Data.Conduit (ConduitM, ($$+), ($$++), + await, yield, bracketP) import Data.Int (Int64) import Data.IORef (newIORef, readIORef, writeIORef) import Network.HTTP.Client hiding (closeManager, @@ -172,3 +174,19 @@ env <- ask let man = getHttpManager env liftIO $ H.httpNoBody req man + +-- | Same as 'Network.HTTP.Simple.httpSource', but uses 'Manager' +-- from Reader environment instead of the global one. +-- +-- Since 2.3.6 +httpSource + :: (MonadResource m, MonadIO n, MonadReader env m, HasHttpManager env) + => Request + -> (Response (ConduitM () ByteString n ()) -> ConduitM () r m ()) + -> ConduitM () r m () +httpSource request withRes = do + env <- ask + bracketP + (runReaderT (responseOpen request) env) + responseClose + withRes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-conduit-2.3.5/Network/HTTP/Conduit.hs new/http-conduit-2.3.7.3/Network/HTTP/Conduit.hs --- old/http-conduit-2.3.5/Network/HTTP/Conduit.hs 2018-04-09 15:40:11.000000000 +0200 +++ new/http-conduit-2.3.7.3/Network/HTTP/Conduit.hs 2019-03-12 08:48:10.000000000 +0100 @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- | @@ -158,6 +159,9 @@ , rawBody , decompress , redirectCount +#if MIN_VERSION_http_client(0,6,2) + , shouldStripHeaderOnRedirect +#endif , checkResponse , responseTimeout , cookieJar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-conduit-2.3.5/Network/HTTP/Simple.hs new/http-conduit-2.3.7.3/Network/HTTP/Simple.hs --- old/http-conduit-2.3.5/Network/HTTP/Simple.hs 2019-01-28 18:33:22.000000000 +0100 +++ new/http-conduit-2.3.7.3/Network/HTTP/Simple.hs 2019-04-30 14:46:07.000000000 +0200 @@ -95,6 +95,7 @@ import qualified Data.Aeson as A import qualified Data.Traversable as T import Control.Exception (throw, throwIO, Exception) +import Data.Monoid import Data.Typeable (Typeable) import qualified Data.Conduit as C import Data.Conduit (runConduit, (.|), ConduitM) @@ -104,6 +105,8 @@ import Control.Monad.Trans.Resource (MonadResource, MonadThrow) import qualified Control.Exception as E (bracket) import Data.Void (Void) +import qualified Data.Attoparsec.ByteString as Atto +import qualified Data.Attoparsec.ByteString.Char8 as Atto8 -- | Perform an HTTP request and return the body as a @ByteString@. -- @@ -151,7 +154,8 @@ where req' = addRequestHeader H.hAccept "application/json" req sink orig = fmap (\x -> fmap (const x) orig) $ do - eres1 <- C.sinkParserEither json' + eres1 <- C.sinkParserEither (json' <* (Atto8.skipSpace *> Atto.endOfInput)) + case eres1 of Left e -> return $ Left $ JSONParseException req' orig e Right value -> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-conduit-2.3.5/http-conduit.cabal new/http-conduit-2.3.7.3/http-conduit.cabal --- old/http-conduit-2.3.5/http-conduit.cabal 2019-01-28 18:33:22.000000000 +0100 +++ new/http-conduit-2.3.7.3/http-conduit.cabal 2019-10-10 06:02:35.000000000 +0200 @@ -1,5 +1,5 @@ name: http-conduit -version: 2.3.5 +version: 2.3.7.3 license: BSD3 license-file: LICENSE author: Michael Snoyman <[email protected]> @@ -23,6 +23,7 @@ library build-depends: base >= 4 && < 5 , aeson >= 0.8 + , attoparsec , bytestring >= 0.9.1.4 , transformers >= 0.2 , resourcet >= 1.1 @@ -64,9 +65,8 @@ , utf8-string , case-insensitive , unliftio - , network , wai >= 3.0 && < 3.3 - , warp >= 3.0.0.2 && < 3.3 + , warp >= 3.0.0.2 && < 3.4 , wai-conduit , http-types , cookie @@ -77,6 +77,7 @@ , aeson , temporary , resourcet + , network source-repository head type: git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-conduit-2.3.5/test/main.hs new/http-conduit-2.3.7.3/test/main.hs --- old/http-conduit-2.3.5/test/main.hs 2018-01-16 14:28:38.000000000 +0100 +++ new/http-conduit-2.3.7.3/test/main.hs 2019-10-10 06:00:58.000000000 +0200 @@ -21,7 +21,6 @@ import qualified Data.IORef as I import qualified Control.Exception as E (catch) import qualified Network.Socket as NS -import qualified Network.BSD import CookieTest (cookieTest) #if MIN_VERSION_conduit(1,1,0) import Data.Conduit.Network (runTCPServer, serverSettings, appSink, appSource, ServerSettings) @@ -406,9 +405,8 @@ describe "hostAddress" $ do it "overrides host" $ withApp app $ \port -> do - entry <- Network.BSD.getHostByName "127.0.0.1" req' <- parseUrlThrow $ "http://example.com:" ++ show port - let req = req' { hostAddress = Just $ Network.BSD.hostAddress entry } + let req = req' { hostAddress = Just 0x0100007f } -- 127.0.0.1 manager <- newManager tlsManagerSettings res <- httpLbs req manager responseBody res @?= "homepage for example.com" @@ -463,11 +461,15 @@ res <- I.readIORef ref res `shouldBe` qs - describe "Simple" $ do - it "JSON" $ jsonApp $ \port -> do + describe "Simple.JSON" $ do + it "normal" $ jsonApp $ \port -> do req <- parseUrlThrow $ "http://localhost:" ++ show port value <- Simple.httpJSON req responseBody value `shouldBe` jsonValue + it "trailing whitespace" $ jsonApp $ \port -> do + req <- parseUrlThrow $ "http://localhost:" ++ show port ++ "/trailing" + value <- Simple.httpJSON req + responseBody value `shouldBe` jsonValue it "RequestBodyIO" $ echo $ \port -> do manager <- newManager tlsManagerSettings @@ -607,11 +609,14 @@ src = yield bs jsonApp :: (Int -> IO ()) -> IO () -jsonApp = withApp $ \_req -> return $ responseLBS +jsonApp = withApp $ \req -> return $ responseLBS status200 [ ("Content-Type", "application/json") - ] - (A.encode jsonValue) + ] $ + case pathInfo req of + [] -> A.encode jsonValue + ["trailing"] -> L.append (A.encode jsonValue) " \n\r\n\t " + x -> error $ "unsupported: " ++ show x jsonValue :: A.Value jsonValue = A.object
