mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/open-uri.rb: call OpenSSL::SSL::SSLSocket#post_connection_check
after connection is made. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b521ae7364
commit
70a7a7271d
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Feb 19 13:52:02 2005 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
|
* lib/open-uri.rb: call OpenSSL::SSL::SSLSocket#post_connection_check
|
||||||
|
after connection is made.
|
||||||
|
|
||||||
Sat Feb 19 01:32:03 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
Sat Feb 19 01:32:03 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
* ext/bigdecimal/lib/bigdecimal/newton.rb: resolve LoadError.
|
* ext/bigdecimal/lib/bigdecimal/newton.rb: resolve LoadError.
|
||||||
|
|
|
@ -208,7 +208,7 @@ module OpenURI
|
||||||
|
|
||||||
if target.userinfo && "1.9.0" <= RUBY_VERSION
|
if target.userinfo && "1.9.0" <= RUBY_VERSION
|
||||||
# don't raise for 1.8 because compatibility.
|
# don't raise for 1.8 because compatibility.
|
||||||
raise "userinfo not supported. [RFC3986]"
|
raise ArgumentError, "userinfo not supported. [RFC3986]"
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'net/http'
|
require 'net/http'
|
||||||
|
@ -243,6 +243,11 @@ module OpenURI
|
||||||
|
|
||||||
resp = nil
|
resp = nil
|
||||||
http.start {
|
http.start {
|
||||||
|
if http.respond_to?(:verify_mode) &&
|
||||||
|
(http.verify_mode & OpenSSL::SSL::VERIFY_PEER) != 0
|
||||||
|
# xxx: information hiding violation
|
||||||
|
http.instance_variable_get(:@socket).io.post_connection_check(target_host)
|
||||||
|
end
|
||||||
req = Net::HTTP::Get.new(request_uri, header)
|
req = Net::HTTP::Get.new(request_uri, header)
|
||||||
if options.include? :http_basic_authentication
|
if options.include? :http_basic_authentication
|
||||||
user, pass = options[:http_basic_authentication]
|
user, pass = options[:http_basic_authentication]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue