net-http-persistent 2.9.1 → 2.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +6 -0
- data/lib/net/http/persistent.rb +12 -1
- data/test/test_net_http_persistent.rb +17 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d97c47fe4e98a924fe059c0214f345bbc9e1ee1d
|
4
|
+
data.tar.gz: ef1438b224c5d17d5f1d94f11fecbd5527b57909
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9c9f30e712239d8e75af6ac42ec184d89ae5fff1c090ac27279e655dcafcec083ad4eeb1fc50c077804dc6a0779b20b09f622fba45a31bc45421f75fdb62f95
|
7
|
+
data.tar.gz: b51b2a2bf007809033ded4b0d404297b6fdc329e65d36405aca53c352cc5840490f88d3d5a6f232b26ec6159835967fa8687485ab2075c9dddec671cb49cae81
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/net/http/persistent.rb
CHANGED
@@ -203,7 +203,7 @@ class Net::HTTP::Persistent
|
|
203
203
|
##
|
204
204
|
# The version of Net::HTTP::Persistent you are using
|
205
205
|
|
206
|
-
VERSION = '2.9.
|
206
|
+
VERSION = '2.9.2'
|
207
207
|
|
208
208
|
##
|
209
209
|
# Exceptions rescued for automatic retry on ruby 2.0.0. This overlaps with
|
@@ -667,6 +667,14 @@ class Net::HTTP::Persistent
|
|
667
667
|
CGI.escape str if str
|
668
668
|
end
|
669
669
|
|
670
|
+
##
|
671
|
+
# URI::unescape wrapper
|
672
|
+
|
673
|
+
def unescape str
|
674
|
+
CGI.unescape str if str
|
675
|
+
end
|
676
|
+
|
677
|
+
|
670
678
|
##
|
671
679
|
# Returns true if the connection should be reset due to an idle timeout, or
|
672
680
|
# maximum request count, false otherwise.
|
@@ -855,6 +863,9 @@ class Net::HTTP::Persistent
|
|
855
863
|
|
856
864
|
@no_proxy.clear
|
857
865
|
|
866
|
+
@proxy_uri.user = unescape @proxy_uri.user
|
867
|
+
@proxy_uri.password = unescape @proxy_uri.password
|
868
|
+
|
858
869
|
if @proxy_uri then
|
859
870
|
@proxy_args = [
|
860
871
|
@proxy_uri.host,
|
@@ -505,6 +505,17 @@ class TestNetHttpPersistent < Minitest::Test
|
|
505
505
|
assert_same c, conns[1]['example.com:80:proxy.example:80:johndoe:muffins']
|
506
506
|
end
|
507
507
|
|
508
|
+
def test_connection_for_proxy_unescaped
|
509
|
+
uri = URI.parse 'http://proxy.example'
|
510
|
+
uri.user = 'john%24doe'
|
511
|
+
uri.password = 'muf%24fins'
|
512
|
+
|
513
|
+
http = Net::HTTP::Persistent.new nil, uri
|
514
|
+
|
515
|
+
assert_equal 'john$doe', http.proxy_uri.user
|
516
|
+
assert_equal 'muf$fins', http.proxy_uri.password
|
517
|
+
end
|
518
|
+
|
508
519
|
def test_connection_for_proxy_host_down
|
509
520
|
Net::HTTP.use_connect :host_down_connect
|
510
521
|
Net::HTTP::Persistent::SSLReuse.use_connect :host_down_connect
|
@@ -646,6 +657,12 @@ class TestNetHttpPersistent < Minitest::Test
|
|
646
657
|
assert_equal '+%3F', @http.escape(' ?')
|
647
658
|
end
|
648
659
|
|
660
|
+
def test_unescape
|
661
|
+
assert_nil @http.unescape nil
|
662
|
+
|
663
|
+
assert_equal ' ?', @http.unescape('+%3F')
|
664
|
+
end
|
665
|
+
|
649
666
|
def test_expired_eh
|
650
667
|
c = basic_connection
|
651
668
|
reqs[c.object_id] = 0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-http-persistent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
KDyY1VIazVgoC8XvR4h/95/iScPiuglzA+DBG1hip1xScAtw05BrXyUNrc9CEMYU
|
31
31
|
wgF94UVoHRp6ywo8I7NP3HcwFQDFNEZPNGXsng==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-
|
33
|
+
date: 2014-02-06 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: minitest
|
metadata.gz.sig
CHANGED
Binary file
|