net-http-persistent 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.txt +7 -1
- data/lib/net/http/persistent.rb +3 -4
- data/test/test_net_http_persistent.rb +17 -2
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d990a23527093f31794ae1e926c425666b2d680ed811282dd4b795a24862876a
|
4
|
+
data.tar.gz: a4faf258fd1a299cd1c86a45a68f6d7034105633313255a16485f9a1f6015507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb00624ad04bf5380843d1870b3cd23b6f2a6442c2f956869dbac748dcdfe65fb6f040139c1e859d2b0df0592ef45119ad9701f2b9e8a983f741b3ecb05c6087
|
7
|
+
data.tar.gz: addb4fbf6cf6c051406ca5d03243d8cf5b5ba605b7cac229b0ca6df1dc61f030222d22d5e8380deaf45df6489a4ec9dd1b83309197be893df266b86fa9b0eaf8
|
data/History.txt
CHANGED
data/lib/net/http/persistent.rb
CHANGED
@@ -181,7 +181,7 @@ class Net::HTTP::Persistent
|
|
181
181
|
##
|
182
182
|
# The version of Net::HTTP::Persistent you are using
|
183
183
|
|
184
|
-
VERSION = '4.0.
|
184
|
+
VERSION = '4.0.4'
|
185
185
|
|
186
186
|
##
|
187
187
|
# Error class for errors raised by Net::HTTP::Persistent. Various
|
@@ -1001,7 +1001,7 @@ class Net::HTTP::Persistent
|
|
1001
1001
|
connection.verify_depth = @verify_depth
|
1002
1002
|
connection.verify_mode = @verify_mode
|
1003
1003
|
connection.verify_hostname = @verify_hostname if
|
1004
|
-
@verify_hostname && connection.respond_to?(:verify_hostname=)
|
1004
|
+
@verify_hostname != nil && connection.respond_to?(:verify_hostname=)
|
1005
1005
|
|
1006
1006
|
if OpenSSL::SSL::VERIFY_PEER == OpenSSL::SSL::VERIFY_NONE and
|
1007
1007
|
not Object.const_defined?(:I_KNOW_THAT_OPENSSL_VERIFY_PEER_EQUALS_VERIFY_NONE_IS_WRONG) then
|
@@ -1111,7 +1111,7 @@ application:
|
|
1111
1111
|
end
|
1112
1112
|
|
1113
1113
|
##
|
1114
|
-
# Sets the HTTPS verify_hostname.
|
1114
|
+
# Sets the HTTPS verify_hostname.
|
1115
1115
|
|
1116
1116
|
def verify_hostname= verify_hostname
|
1117
1117
|
@verify_hostname = verify_hostname
|
@@ -1131,4 +1131,3 @@ end
|
|
1131
1131
|
|
1132
1132
|
require_relative 'persistent/connection'
|
1133
1133
|
require_relative 'persistent/pool'
|
1134
|
-
|
@@ -1343,7 +1343,7 @@ class TestNetHttpPersistent < Minitest::Test
|
|
1343
1343
|
assert_equal OpenSSL::SSL::VERIFY_NONE, c.verify_mode
|
1344
1344
|
end
|
1345
1345
|
|
1346
|
-
def
|
1346
|
+
def test_ssl_enable_verify_hostname
|
1347
1347
|
skip 'OpenSSL is missing' unless HAVE_OPENSSL
|
1348
1348
|
|
1349
1349
|
@http.verify_hostname = true
|
@@ -1358,6 +1358,22 @@ class TestNetHttpPersistent < Minitest::Test
|
|
1358
1358
|
assert c.verify_hostname
|
1359
1359
|
end
|
1360
1360
|
|
1361
|
+
def test_ssl_disable_verify_hostname
|
1362
|
+
skip 'OpenSSL is missing' unless HAVE_OPENSSL
|
1363
|
+
|
1364
|
+
@http.verify_hostname = false
|
1365
|
+
c = Net::HTTP.new 'localhost', 80
|
1366
|
+
|
1367
|
+
skip 'net/http doesn\'t provide verify_hostname= method' unless
|
1368
|
+
c.respond_to?(:verify_hostname=)
|
1369
|
+
|
1370
|
+
@http.ssl c
|
1371
|
+
|
1372
|
+
assert c.use_ssl?
|
1373
|
+
assert c.verify_hostname == false
|
1374
|
+
end
|
1375
|
+
|
1376
|
+
|
1361
1377
|
def test_ssl_warning
|
1362
1378
|
skip 'OpenSSL is missing' unless HAVE_OPENSSL
|
1363
1379
|
|
@@ -1474,4 +1490,3 @@ class TestNetHttpPersistent < Minitest::Test
|
|
1474
1490
|
end
|
1475
1491
|
end
|
1476
1492
|
end
|
1477
|
-
|
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-http-persistent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
11
|
date: 2024-09-09 00:00:00.000000000 Z
|
@@ -62,6 +63,7 @@ licenses:
|
|
62
63
|
- MIT
|
63
64
|
metadata:
|
64
65
|
homepage_uri: https://github.com/drbrain/net-http-persistent
|
66
|
+
post_install_message:
|
65
67
|
rdoc_options:
|
66
68
|
- "--main"
|
67
69
|
- README.rdoc
|
@@ -78,7 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
80
|
- !ruby/object:Gem::Version
|
79
81
|
version: '0'
|
80
82
|
requirements: []
|
81
|
-
rubygems_version: 3.
|
83
|
+
rubygems_version: 3.0.3.1
|
84
|
+
signing_key:
|
82
85
|
specification_version: 4
|
83
86
|
summary: Manages persistent connections using Net::HTTP including a thread pool for
|
84
87
|
connecting to multiple hosts
|