mirror of
https://github.com/github/rails.git
synced 2026-01-15 01:28:17 -05:00
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:
committed by
Jeremy Kemper
parent
4b33155428
commit
e1d27eedce
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user