Hello community,
here is the log from the commit of package ghc-http-conduit for
openSUSE:Factory checked in at 2019-05-09 10:10:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-http-conduit (Old)
and /work/SRC/openSUSE:Factory/.ghc-http-conduit.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-conduit"
Thu May 9 10:10:02 2019 rev:20 rq:700199 version:2.3.7.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-http-conduit/ghc-http-conduit.changes
2019-04-28 20:13:03.270433353 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-http-conduit.new.5148/ghc-http-conduit.changes
2019-05-09 10:10:04.105141145 +0200
@@ -1,0 +2,8 @@
+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)
+
+-------------------------------------------------------------------
Old:
----
http-conduit-2.3.7.tar.gz
New:
----
http-conduit-2.3.7.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-http-conduit.spec ++++++
--- /var/tmp/diff_new_pack.eICmZT/_old 2019-05-09 10:10:04.729142931 +0200
+++ /var/tmp/diff_new_pack.eICmZT/_new 2019-05-09 10:10:04.729142931 +0200
@@ -19,7 +19,7 @@
%global pkg_name http-conduit
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 2.3.7
+Version: 2.3.7.1
Release: 0
Summary: HTTP client package with conduit interface and HTTPS support
License: BSD-2-Clause
++++++ http-conduit-2.3.7.tar.gz -> http-conduit-2.3.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-conduit-2.3.7/ChangeLog.md
new/http-conduit-2.3.7.1/ChangeLog.md
--- old/http-conduit-2.3.7/ChangeLog.md 2019-04-02 15:24:20.000000000 +0200
+++ new/http-conduit-2.3.7.1/ChangeLog.md 2019-04-30 14:46:59.000000000
+0200
@@ -1,5 +1,9 @@
# ChangeLog for http-conduit
+## 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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-conduit-2.3.7/Network/HTTP/Simple.hs
new/http-conduit-2.3.7.1/Network/HTTP/Simple.hs
--- old/http-conduit-2.3.7/Network/HTTP/Simple.hs 2019-04-02
15:24:20.000000000 +0200
+++ new/http-conduit-2.3.7.1/Network/HTTP/Simple.hs 2019-04-30
14:46:07.000000000 +0200
@@ -106,6 +106,7 @@
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@.
--
@@ -153,7 +154,7 @@
where
req' = addRequestHeader H.hAccept "application/json" req
sink orig = fmap (\x -> fmap (const x) orig) $ do
- eres1 <- C.sinkParserEither (json' <* Atto.endOfInput)
+ eres1 <- C.sinkParserEither (json' <* (Atto8.skipSpace *>
Atto.endOfInput))
case eres1 of
Left e -> return $ Left $ JSONParseException req' orig e
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-conduit-2.3.7/http-conduit.cabal
new/http-conduit-2.3.7.1/http-conduit.cabal
--- old/http-conduit-2.3.7/http-conduit.cabal 2019-04-02 15:24:20.000000000
+0200
+++ new/http-conduit-2.3.7.1/http-conduit.cabal 2019-04-30 15:27:54.000000000
+0200
@@ -1,5 +1,5 @@
name: http-conduit
-version: 2.3.7
+version: 2.3.7.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-conduit-2.3.7/test/main.hs
new/http-conduit-2.3.7.1/test/main.hs
--- old/http-conduit-2.3.7/test/main.hs 2018-01-16 14:28:38.000000000 +0100
+++ new/http-conduit-2.3.7.1/test/main.hs 2019-04-30 14:46:31.000000000
+0200
@@ -463,11 +463,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 +611,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"] -> A.encode jsonValue <> " \n\r\n\t "
+ x -> error $ "unsupported: " ++ show x
jsonValue :: A.Value
jsonValue = A.object