Ruby 1.9 compat: fix for SSL in Active Resource

[#1272 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Brendan Schwartz
2009-03-25 15:14:52 -04:00
committed by Jeremy Kemper
parent 4b33155428
commit e1d27eedce

View File

@@ -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