Niels Ganser
2009-Jul-16 10:53 UTC
Ruby 1.9 compat: ActiveResource::Connection#http.use_ssl (lh #1272, #1872)
Hey guys, could someone please apply the patch below from #1272 [1]? Doing so would also close the #1872 [2]. Thanks, Niels [1] https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1272-ruby19-incompatibility-activeresourceconnectionhttp-use_ssl [2] https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1872-use-of-undocumented-nethttp-method-breaks-23-on-ruby-191 From dad610b5ae3e73a42b0455bdcb4736b9bbd3f140 Mon Sep 17 00:00:00 2001 From: Brendan Schwartz <brendanschwartz@gmail.com> Date: Wed, 25 Mar 2009 15:14:52 -0400 Subject: [PATCH] ruby1.9 compatibility fix for SSL in ActiveResource --- activeresource/lib/active_resource/connection.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/activeresource/lib/active_resource/connection.rb b/ activeresource/lib/active_resource/connection.rb index 80d5c95..0f2148a 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -188,7 +188,7 @@ module ActiveResource def http http = Net::HTTP.new(@site.host, @site.port) http.use_ssl = @site.is_a?(URI::HTTPS) - http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl + http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl? http.read_timeout = @timeout if @timeout # If timeout is not set, the default Net::HTTP timeout (60s) is used. http end -- 1.6.0.6