mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/open-uri.rb (OpenURI.open_http): refine post_connection_check
call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70db83a8c3
commit
f2a501261f
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jul 1 12:44:56 2005 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
|
* lib/open-uri.rb (OpenURI.open_http): refine post_connection_check
|
||||||
|
call.
|
||||||
|
|
||||||
Fri Jul 1 11:34:08 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Jul 1 11:34:08 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* missing/crypt.c: replaced with 4.4BSD version.
|
* missing/crypt.c: replaced with 4.4BSD version.
|
||||||
|
|
|
@ -243,10 +243,15 @@ module OpenURI
|
||||||
|
|
||||||
resp = nil
|
resp = nil
|
||||||
http.start {
|
http.start {
|
||||||
if http.respond_to?(:verify_mode) &&
|
if target.class == URI::HTTPS
|
||||||
(http.verify_mode & OpenSSL::SSL::VERIFY_PEER) != 0
|
|
||||||
# xxx: information hiding violation
|
# xxx: information hiding violation
|
||||||
http.instance_variable_get(:@socket).io.post_connection_check(target_host)
|
sock = http.instance_variable_get(:@socket)
|
||||||
|
if sock.respond_to?(:io)
|
||||||
|
sock = sock.io # 1.9
|
||||||
|
else
|
||||||
|
sock = sock.instance_variable_get(:@socket) # 1.8
|
||||||
|
end
|
||||||
|
sock.post_connection_check(target_host)
|
||||||
end
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue