Hello community,

here is the log from the commit of package ghc-http-conduit for 
openSUSE:Factory checked in at 2017-07-23 12:14:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-http-conduit (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-http-conduit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-http-conduit"

Sun Jul 23 12:14:27 2017 rev:10 rq:511913 version:2.2.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-http-conduit/ghc-http-conduit.changes        
2017-03-21 22:48:25.540312143 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-http-conduit.new/ghc-http-conduit.changes   
2017-07-23 12:14:29.558958356 +0200
@@ -1,0 +2,5 @@
+Mon Jul 17 03:01:30 UTC 2017 - psim...@suse.com
+
+- Update to version 2.2.3.2.
+
+-------------------------------------------------------------------

Old:
----
  http-conduit-2.2.3.1.tar.gz

New:
----
  http-conduit-2.2.3.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-http-conduit.spec ++++++
--- /var/tmp/diff_new_pack.owglw8/_old  2017-07-23 12:14:30.566815990 +0200
+++ /var/tmp/diff_new_pack.owglw8/_new  2017-07-23 12:14:30.570815425 +0200
@@ -19,7 +19,7 @@
 %global pkg_name http-conduit
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        2.2.3.1
+Version:        2.2.3.2
 Release:        0
 Summary:        HTTP client package with conduit interface and HTTPS support
 License:        BSD-2-Clause

++++++ http-conduit-2.2.3.1.tar.gz -> http-conduit-2.2.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-conduit-2.2.3.1/ChangeLog.md 
new/http-conduit-2.2.3.2/ChangeLog.md
--- old/http-conduit-2.2.3.1/ChangeLog.md       2017-02-26 15:40:36.000000000 
+0100
+++ new/http-conduit-2.2.3.2/ChangeLog.md       2017-07-07 11:45:59.000000000 
+0200
@@ -1,3 +1,7 @@
+## 2.2.3.2
+
+* Add proper headers for `httpJSON` and `httpJSONEither` 
[#284](https://github.com/snoyberg/http-client/issues/284)
+
 ## 2.2.3.1
 
 * Minor README improvement
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-conduit-2.2.3.1/Network/HTTP/Conduit.hs 
new/http-conduit-2.2.3.2/Network/HTTP/Conduit.hs
--- old/http-conduit-2.2.3.1/Network/HTTP/Conduit.hs    2016-12-19 
16:29:45.000000000 +0100
+++ new/http-conduit-2.2.3.2/Network/HTTP/Conduit.hs    2017-07-07 
11:46:38.000000000 +0200
@@ -87,7 +87,7 @@
 -- >                 , cookie_http_only = False
 -- >                 }
 -- >
--- > main = withSocketsDo $ do
+-- > main = do
 -- >      request' <- parseRequest "http://example.com/secret-page";
 -- >      manager <- newManager tlsManagerSettings
 -- >      let request = request' { cookieJar = Just $ createCookieJar [cookie] 
}
@@ -99,19 +99,6 @@
 -- >                        else return Nothing
 -- >                  _ -> E.throw ex)
 --
--- Any network code on Windows requires some initialization, and the network
--- library provides withSocketsDo to perform it. Therefore, proper usage of
--- this library will always involve calling that function at some point.  The
--- best approach is to simply call them at the beginning of your main function,
--- such as:
---
--- > import Network.HTTP.Conduit
--- > import qualified Data.ByteString.Lazy as L
--- > import Network (withSocketsDo)
--- >
--- > main = withSocketsDo
--- >      $ simpleHttp "http://www.haskell.org/"; >>= L.putStr
---
 -- Cookies are implemented according to RFC 6265.
 --
 -- Note that by default, the functions in this package will throw exceptions
@@ -124,7 +111,7 @@
 -- > import Network
 -- >
 -- > main :: IO ()
--- > main = withSocketsDo $ do
+-- > main = do
 -- >      request' <- parseRequest "http://www.yesodweb.com/does-not-exist";
 -- >      let request = request' { checkStatus = \_ _ _ -> Nothing }
 -- >      manager <- newManager tlsManagerSettings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-conduit-2.2.3.1/Network/HTTP/Simple.hs 
new/http-conduit-2.2.3.2/Network/HTTP/Simple.hs
--- old/http-conduit-2.2.3.1/Network/HTTP/Simple.hs     2016-12-19 
16:29:45.000000000 +0100
+++ new/http-conduit-2.2.3.2/Network/HTTP/Simple.hs     2017-07-07 
11:45:59.000000000 +0200
@@ -15,6 +15,8 @@
 -- >
 -- > main :: IO ()
 -- > main = httpLBS "http://example.com"; >>= L8.putStrLn
+--
+-- The `Data.String.IsString` instance uses `H.parseRequest` behind the scenes 
and inherits its behavior.
 module Network.HTTP.Simple
     ( -- * Perform requests
       httpLBS
@@ -123,17 +125,17 @@
 httpJSONEither :: (MonadIO m, FromJSON a)
                => H.Request
                -> m (H.Response (Either JSONException a))
-httpJSONEither req =
-    liftIO $ httpSink req sink
+httpJSONEither req = liftIO $ httpSink req' sink
   where
+    req' = addRequestHeader H.hAccept "application/json" req
     sink orig = fmap (\x -> fmap (const x) orig) $ do
         eres1 <- C.sinkParserEither json'
         case eres1 of
-            Left e -> return $ Left $ JSONParseException req orig e
+            Left e -> return $ Left $ JSONParseException req' orig e
             Right value ->
                 case A.fromJSON value of
                     A.Error e -> return $ Left $ JSONConversionException
-                        req (fmap (const value) orig) e
+                        req' (fmap (const value) orig) e
                     A.Success x -> return $ Right x
 
 -- | An exception that can occur when parsing JSON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-conduit-2.2.3.1/http-conduit.cabal 
new/http-conduit-2.2.3.2/http-conduit.cabal
--- old/http-conduit-2.2.3.1/http-conduit.cabal 2017-02-26 15:40:28.000000000 
+0100
+++ new/http-conduit-2.2.3.2/http-conduit.cabal 2017-07-07 11:45:59.000000000 
+0200
@@ -1,5 +1,5 @@
 name:            http-conduit
-version:         2.2.3.1
+version:         2.2.3.2
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <mich...@snoyman.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-conduit-2.2.3.1/test/main.hs 
new/http-conduit-2.2.3.2/test/main.hs
--- old/http-conduit-2.2.3.1/test/main.hs       2016-12-19 16:29:45.000000000 
+0100
+++ new/http-conduit-2.2.3.2/test/main.hs       2017-07-07 11:46:38.000000000 
+0200
@@ -20,7 +20,6 @@
 import Control.Exception.Lifted (try, SomeException, bracket, onException, 
IOException)
 import qualified Data.IORef as I
 import qualified Control.Exception as E (catch)
-import Network (withSocketsDo)
 import Network.Socket (sClose)
 import qualified Network.BSD
 import CookieTest (cookieTest)
@@ -172,7 +171,7 @@
         sendResponse res
 
 main :: IO ()
-main = withSocketsDo $ do
+main = do
   mapM_ (`hSetBuffering` LineBuffering) [stdout, stderr]
   hspec $ do
     cookieTest


Reply via email to