Hello community,
here is the log from the commit of package ghc-http-client-tls for
openSUSE:Factory checked in at 2018-05-30 12:09:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-http-client-tls (Old)
and /work/SRC/openSUSE:Factory/.ghc-http-client-tls.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-client-tls"
Wed May 30 12:09:49 2018 rev:12 rq:607821 version:0.3.5.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-http-client-tls/ghc-http-client-tls.changes
2017-09-15 21:50:36.523547179 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-http-client-tls.new/ghc-http-client-tls.changes
2018-05-30 12:26:05.120779264 +0200
@@ -1,0 +2,8 @@
+Mon May 14 17:02:11 UTC 2018 - [email protected]
+
+- Update http-client-tls to version 0.3.5.3.
+ * Fix `newTlsManager`
[#325](https://github.com/snoyberg/http-client/issues/325)
+ * [#289](https://github.com/snoyberg/http-client/issues/289):
+ Keep original `TLSSettings` when creating a `Manager` using
`newTlsManagerWith`.
+
+-------------------------------------------------------------------
Old:
----
http-client-tls-0.3.5.1.tar.gz
New:
----
http-client-tls-0.3.5.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-http-client-tls.spec ++++++
--- /var/tmp/diff_new_pack.0RAUg1/_old 2018-05-30 12:26:06.076747192 +0200
+++ /var/tmp/diff_new_pack.0RAUg1/_new 2018-05-30 12:26:06.080747059 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-http-client-tls
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%global pkg_name http-client-tls
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.3.5.1
+Version: 0.3.5.3
Release: 0
Summary: Http-client backend using the connection package and tls
library
License: MIT
@@ -82,7 +82,7 @@
%ghc_pkg_recache
%files -f %{name}.files
-%doc LICENSE
+%license LICENSE
%files devel -f %{name}-devel.files
%doc ChangeLog.md README.md
++++++ http-client-tls-0.3.5.1.tar.gz -> http-client-tls-0.3.5.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-client-tls-0.3.5.1/ChangeLog.md
new/http-client-tls-0.3.5.3/ChangeLog.md
--- old/http-client-tls-0.3.5.1/ChangeLog.md 2017-06-18 06:54:54.000000000
+0200
+++ new/http-client-tls-0.3.5.3/ChangeLog.md 2018-02-05 22:28:18.000000000
+0100
@@ -1,3 +1,12 @@
+## 0.3.5.3
+
+* Fix `newTlsManager`
[#325](https://github.com/snoyberg/http-client/issues/325)
+
+## 0.3.5.2
+
+* [#289](https://github.com/snoyberg/http-client/issues/289):
+ Keep original `TLSSettings` when creating a `Manager` using
`newTlsManagerWith`.
+
## 0.3.5.1
* Also catch TLSError exceptions
[#273](https://github.com/snoyberg/http-client/pull/273)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-client-tls-0.3.5.1/Network/HTTP/Client/TLS.hs
new/http-client-tls-0.3.5.3/Network/HTTP/Client/TLS.hs
--- old/http-client-tls-0.3.5.1/Network/HTTP/Client/TLS.hs 2017-06-18
06:55:25.000000000 +0200
+++ new/http-client-tls-0.3.5.3/Network/HTTP/Client/TLS.hs 2018-02-05
22:28:18.000000000 +0100
@@ -180,7 +180,16 @@
--
-- @since 0.3.4
newTlsManager :: MonadIO m => m Manager
-newTlsManager = newTlsManagerWith defaultManagerSettings
+newTlsManager = liftIO $ do
+ env <- getEnvironment
+ let lenv = Map.fromList $ map (first $ T.toLower . T.pack) env
+ msocksHTTP = parseSocksSettings env lenv "http_proxy"
+ msocksHTTPS = parseSocksSettings env lenv "https_proxy"
+ settings = mkManagerSettingsContext' defaultManagerSettings (Just
globalConnectionContext) def msocksHTTP msocksHTTPS
+ settings' = maybe id (const $ managerSetInsecureProxy
proxyFromRequest) msocksHTTP
+ $ maybe id (const $ managerSetSecureProxy proxyFromRequest)
msocksHTTPS
+ settings
+ newManager settings'
-- | Load up a new TLS manager based upon specified settings,
-- respecting proxy environment variables.
@@ -196,6 +205,14 @@
settings' = maybe id (const $ managerSetInsecureProxy
proxyFromRequest) msocksHTTP
$ maybe id (const $ managerSetSecureProxy proxyFromRequest)
msocksHTTPS
settings
+ -- We want to keep the original TLS settings that were
+ -- passed in. Sadly they aren't available as a record
+ -- field on `ManagerSettings`. So instead we grab the
+ -- fields that depend on the TLS settings.
+ -- https://github.com/snoyberg/http-client/issues/289
+ { managerTlsConnection = managerTlsConnection set
+ , managerTlsProxyConnection =
managerTlsProxyConnection set
+ }
newManager settings'
parseSocksSettings :: [(String, String)] -- ^ original environment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-client-tls-0.3.5.1/bench/Bench.hs
new/http-client-tls-0.3.5.3/bench/Bench.hs
--- old/http-client-tls-0.3.5.1/bench/Bench.hs 2016-12-19 16:29:45.000000000
+0100
+++ new/http-client-tls-0.3.5.3/bench/Bench.hs 2018-01-16 14:28:38.000000000
+0100
@@ -1,6 +1,11 @@
+{-# LANGUAGE CPP #-}
module Main where
-import Criterion.Main
+#if MIN_VERSION_gauge(0, 2, 0)
+import Gauge
+#else
+import Gauge.Main
+#endif
import Network.HTTP.Client
import Network.HTTP.Client.TLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-client-tls-0.3.5.1/http-client-tls.cabal
new/http-client-tls-0.3.5.3/http-client-tls.cabal
--- old/http-client-tls-0.3.5.1/http-client-tls.cabal 2017-06-18
06:54:57.000000000 +0200
+++ new/http-client-tls-0.3.5.3/http-client-tls.cabal 2018-02-05
22:28:18.000000000 +0100
@@ -1,5 +1,5 @@
name: http-client-tls
-version: 0.3.5.1
+version: 0.3.5.3
synopsis: http-client backend using the connection package and tls
library
description: Hackage documentation generation is not reliable. For up
to date documentation, please see:
<https://www.stackage.org/package/http-client-tls>.
homepage: https://github.com/snoyberg/http-client
@@ -41,6 +41,7 @@
hs-source-dirs: test
default-language: Haskell2010
build-depends: base
+ , connection
, hspec
, http-client
, http-client-tls
@@ -52,6 +53,6 @@
hs-source-dirs: bench
default-language: Haskell2010
build-depends: base
- , criterion
+ , gauge
, http-client
, http-client-tls
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/http-client-tls-0.3.5.1/test/Spec.hs
new/http-client-tls-0.3.5.3/test/Spec.hs
--- old/http-client-tls-0.3.5.1/test/Spec.hs 2016-12-19 16:29:45.000000000
+0100
+++ new/http-client-tls-0.3.5.3/test/Spec.hs 2018-02-05 22:17:59.000000000
+0100
@@ -1,5 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
import Test.Hspec
+import Network.Connection
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Network.HTTP.Types
@@ -27,3 +28,25 @@
join (applyDigestAuth "user" "passwd" "http://httpbin.org/" man)
`shouldThrow` \(DigestAuthException _ _ det) ->
det == UnexpectedStatusCode
+
+ -- https://github.com/snoyberg/http-client/issues/289
+ it "accepts TLS settings" $ do
+ let
+ tlsSettings = TLSSettingsSimple
+ { settingDisableCertificateValidation = True
+ , settingDisableSession = False
+ , settingUseServerName = False
+ }
+ socketSettings = Nothing
+ managerSettings = mkManagerSettings tlsSettings socketSettings
+ manager <- newTlsManagerWith managerSettings
+ let url = "https://wrong.host.badssl.com"
+ request <- parseRequest url
+ response <- httpNoBody request manager
+ responseStatus response `shouldBe` status200
+
+ it "global supports TLS" $ do
+ manager <- getGlobalManager
+ request <- parseRequest "https://httpbin.org"
+ response <- httpNoBody request manager
+ responseStatus response `shouldBe` status200