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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55d2e4859498dd8d729452db6118d77d13535bd1
4
- data.tar.gz: 7d1a5487a20e2d8d44be10241010e7022af2262f
3
+ metadata.gz: d97c47fe4e98a924fe059c0214f345bbc9e1ee1d
4
+ data.tar.gz: ef1438b224c5d17d5f1d94f11fecbd5527b57909
5
5
  SHA512:
6
- metadata.gz: 736f79380094d6b6a84b923c6e8251ee75e95b66185bb072ba7f19450263c0e96b95e0ce92622050cddb3a5dc8e9e2fc3c04ab82f1787e3524b22902f340d9b9
7
- data.tar.gz: 0b0c2b885b275bb98e64e22d4c96869496ff3602e17c9be2b846015293354646d4685204d7b32ed56d79a55dd9633fd84bb8b09fc49fb83448cae72a849dd9e4
6
+ metadata.gz: a9c9f30e712239d8e75af6ac42ec184d89ae5fff1c090ac27279e655dcafcec083ad4eeb1fc50c077804dc6a0779b20b09f622fba45a31bc45421f75fdb62f95
7
+ data.tar.gz: b51b2a2bf007809033ded4b0d404297b6fdc329e65d36405aca53c352cc5840490f88d3d5a6f232b26ec6159835967fa8687485ab2075c9dddec671cb49cae81
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 2.9.2 / 2014-02-05
2
+
3
+ * Bug fixes
4
+ * Special characters in proxy passwords are now handled correctly. Issue
5
+ #48 by Mislav Marohnić. Pull request #54 by Juha Kajava
6
+
1
7
  === 2.9.1 / 2014-01-22
2
8
 
3
9
  * Bug fixes
@@ -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.1'
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.1
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-01-22 00:00:00.000000000 Z
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