net-http-persistent 4.0.3 → 4.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dda1829232ea53f61dd44b4added8e65777661bb9c2bb8f4c49014c7dbbe3d1d
4
- data.tar.gz: 9321f0aad6dbc328d2612212321e9f2daa8cad2330f677208c55089676f666e7
3
+ metadata.gz: d990a23527093f31794ae1e926c425666b2d680ed811282dd4b795a24862876a
4
+ data.tar.gz: a4faf258fd1a299cd1c86a45a68f6d7034105633313255a16485f9a1f6015507
5
5
  SHA512:
6
- metadata.gz: 9ca608a9a2f899b0ac3636d848f4581085fae57eec74527ed457e21a6c1988d909123cd4d4e102ab77d53a3839e9778adc140ecdff9d57d5f1dcbcd2c2d69c5c
7
- data.tar.gz: 03622a828eea0b5266511a39afc8bafdccf41d1e7e572cf04e0e23548104307d857b33bdaa387ed12ef46f8fd890762a8d39fa3ac9a4e2ca7d70026cd9bfd1b5
6
+ metadata.gz: bb00624ad04bf5380843d1870b3cd23b6f2a6442c2f956869dbac748dcdfe65fb6f040139c1e859d2b0df0592ef45119ad9701f2b9e8a983f741b3ecb05c6087
7
+ data.tar.gz: addb4fbf6cf6c051406ca5d03243d8cf5b5ba605b7cac229b0ca6df1dc61f030222d22d5e8380deaf45df6489a4ec9dd1b83309197be893df266b86fa9b0eaf8
data/History.txt CHANGED
@@ -1,4 +1,10 @@
1
- === 4.0.2 / 2024-09-09
1
+ === 4.0.4 / 2024-09-09
2
+
3
+ Bug fixes:
4
+
5
+ * Allow setting verify_hostname to false
6
+
7
+ === 4.0.3 / 2024-09-09
2
8
 
3
9
  Bug fixes:
4
10
 
@@ -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.3'
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. Defaults to false.
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 test_ssl_verify_hostname
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.3
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.6.0.dev
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