Hello community,
here is the log from the commit of package ghc-http-client for openSUSE:Factory
checked in at 2020-11-19 11:58:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-http-client (Old)
and /work/SRC/openSUSE:Factory/.ghc-http-client.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-client"
Thu Nov 19 11:58:37 2020 rev:38 rq:849156 version:0.7.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-http-client/ghc-http-client.changes
2020-08-28 21:33:37.116673789 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-http-client.new.5913/ghc-http-client.changes
2020-11-23 10:27:29.173159649 +0100
@@ -1,0 +2,8 @@
+Tue Nov 17 15:27:10 UTC 2020 - [email protected]
+
+- Update http-client to version 0.7.3.
+ ## 0.7.3
+
+ * Added `withSocket` to `Network.HTTP.Client.Connection`.
+
+-------------------------------------------------------------------
Old:
----
http-client-0.7.2.1.tar.gz
New:
----
http-client-0.7.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-http-client.spec ++++++
--- /var/tmp/diff_new_pack.YyYOVV/_old 2020-11-23 10:27:29.785160341 +0100
+++ /var/tmp/diff_new_pack.YyYOVV/_new 2020-11-23 10:27:29.789160345 +0100
@@ -19,7 +19,7 @@
%global pkg_name http-client
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.7.2.1
+Version: 0.7.3
Release: 0
Summary: An HTTP client engine
License: MIT
++++++ http-client-0.7.2.1.tar.gz -> http-client-0.7.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-client-0.7.2.1/ChangeLog.md
new/http-client-0.7.3/ChangeLog.md
--- old/http-client-0.7.2.1/ChangeLog.md 2020-08-23 15:45:20.000000000
+0200
+++ new/http-client-0.7.3/ChangeLog.md 2020-11-15 20:30:09.000000000 +0100
@@ -1,5 +1,9 @@
# Changelog for http-client
+## 0.7.3
+
+* Added `withSocket` to `Network.HTTP.Client.Connection`.
+
## 0.7.2.1
* Fix bug in `useProxySecureWithoutConnect`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/http-client-0.7.2.1/Network/HTTP/Client/Connection.hs
new/http-client-0.7.3/Network/HTTP/Client/Connection.hs
--- old/http-client-0.7.2.1/Network/HTTP/Client/Connection.hs 2020-08-16
16:14:46.000000000 +0200
+++ new/http-client-0.7.3/Network/HTTP/Client/Connection.hs 2020-11-15
20:30:09.000000000 +0100
@@ -10,6 +10,7 @@
, openSocketConnectionSize
, makeConnection
, socketConnection
+ , withSocket
) where
import Data.ByteString (ByteString, empty)
@@ -144,7 +145,17 @@
-> String -- ^ host
-> Int -- ^ port
-> IO Connection
-openSocketConnectionSize tweakSocket chunksize hostAddress' host' port' = do
+openSocketConnectionSize tweakSocket chunksize hostAddress' host' port' =
+ withSocket tweakSocket hostAddress' host' port' $ \ sock ->
+ socketConnection sock chunksize
+
+withSocket :: (Socket -> IO ())
+ -> Maybe HostAddress
+ -> String -- ^ host
+ -> Int -- ^ port
+ -> (Socket -> IO a)
+ -> IO a
+withSocket tweakSocket hostAddress' host' port' f = do
let hints = NS.defaultHints { NS.addrSocketType = NS.Stream }
addrs <- case hostAddress' of
Nothing ->
@@ -160,16 +171,18 @@
, NS.addrCanonName = Nothing
}]
- firstSuccessful addrs $ \addr ->
- E.bracketOnError
- (NS.socket (NS.addrFamily addr) (NS.addrSocketType addr)
- (NS.addrProtocol addr))
- NS.close
- (\sock -> do
- NS.setSocketOption sock NS.NoDelay 1
- tweakSocket sock
- NS.connect sock (NS.addrAddress addr)
- socketConnection sock chunksize)
+ E.bracketOnError (firstSuccessful addrs $ openSocket tweakSocket) NS.close
f
+
+openSocket tweakSocket addr =
+ E.bracketOnError
+ (NS.socket (NS.addrFamily addr) (NS.addrSocketType addr)
+ (NS.addrProtocol addr))
+ NS.close
+ (\sock -> do
+ NS.setSocketOption sock NS.NoDelay 1
+ tweakSocket sock
+ NS.connect sock (NS.addrAddress addr)
+ return sock)
firstSuccessful :: [NS.AddrInfo] -> (NS.AddrInfo -> IO a) -> IO a
firstSuccessful [] _ = error "getAddrInfo returned empty list"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-client-0.7.2.1/http-client.cabal
new/http-client-0.7.3/http-client.cabal
--- old/http-client-0.7.2.1/http-client.cabal 2020-08-23 15:44:35.000000000
+0200
+++ new/http-client-0.7.3/http-client.cabal 2020-11-15 20:30:09.000000000
+0100
@@ -1,5 +1,5 @@
name: http-client
-version: 0.7.2.1
+version: 0.7.3
synopsis: An HTTP client engine
description: Hackage documentation generation is not reliable. For up
to date documentation, please see:
<http://www.stackage.org/package/http-client>.
homepage: https://github.com/snoyberg/http-client
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives:
https://lists.opensuse.org/archives/list/[email protected]