net-http-persistent 2.5 → 2.5.1

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.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 2.5.1 / 2012-02-10
2
+
3
+ * Bug fix
4
+ * Reusing SSL connections with HTTP proxies now works. Issue #15 by Paul
5
+ Ingham and mcrmfc
6
+
1
7
  === 2.5 / 2012-02-07
2
8
 
3
9
  * Minor enhancements
@@ -172,7 +172,7 @@ class Net::HTTP::Persistent
172
172
  ##
173
173
  # The version of Net::HTTP::Persistent you are using
174
174
 
175
- VERSION = '2.5'
175
+ VERSION = '2.5.1'
176
176
 
177
177
  ##
178
178
  # Error class for errors raised by Net::HTTP::Persistent. Various
@@ -43,7 +43,6 @@ class Net::HTTP::Persistent::SSLReuse < Net::HTTP
43
43
  @ssl_context.set_params(ssl_parameters)
44
44
  end
45
45
  s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
46
- s.session = @ssl_session if @ssl_session
47
46
  s.sync_close = true
48
47
  end
49
48
  @socket = Net::BufferedIO.new(s)
@@ -65,6 +64,7 @@ class Net::HTTP::Persistent::SSLReuse < Net::HTTP
65
64
  @socket.writeline ''
66
65
  Net::HTTPResponse.read_new(@socket).value
67
66
  end
67
+ s.session = @ssl_session if @ssl_session
68
68
  # Server Name Indication (SNI) RFC 3546
69
69
  s.hostname = @address if s.respond_to? :hostname=
70
70
  timeout(@open_timeout) { s.connect }
@@ -85,7 +85,7 @@ class Net::HTTP::Persistent::SSLReuse < Net::HTTP
85
85
  # From ruby_1_8_7 branch r29865 including a modified
86
86
  # http://redmine.ruby-lang.org/issues/5341
87
87
 
88
- def connect
88
+ def connect # :nodoc:
89
89
  D "opening connection to #{conn_address()}..."
90
90
  s = timeout(@open_timeout) { TCPSocket.open(conn_address(), conn_port()) }
91
91
  D "opened"
@@ -95,7 +95,6 @@ class Net::HTTP::Persistent::SSLReuse < Net::HTTP
95
95
  @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
96
96
  end
97
97
  s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
98
- s.session = @ssl_session if @ssl_session
99
98
  s.sync_close = true
100
99
  end
101
100
  @socket = Net::BufferedIO.new(s)
@@ -114,6 +113,7 @@ class Net::HTTP::Persistent::SSLReuse < Net::HTTP
114
113
  @socket.writeline ''
115
114
  Net::HTTPResponse.read_new(@socket).value
116
115
  end
116
+ s.session = @ssl_session if @ssl_session
117
117
  s.connect
118
118
  if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
119
119
  s.post_connection_check(@address)
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-http-persistent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 5
9
- version: "2.5"
9
+ - 1
10
+ version: 2.5.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Eric Hodel
@@ -35,7 +36,7 @@ cert_chain:
35
36
  YJY7T/W2n+eWy8WuPhzVUkyzguj0bQe27NDeabgCh2mHd4Hynk2AkYh8MQ==
36
37
  -----END CERTIFICATE-----
37
38
 
38
- date: 2012-02-07 00:00:00 Z
39
+ date: 2012-02-10 00:00:00 Z
39
40
  dependencies:
40
41
  - !ruby/object:Gem::Dependency
41
42
  name: minitest
metadata.gz.sig CHANGED
Binary file