mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -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:
parent
06afa48c8c
commit
201387496e
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ module ActiveResource
|
||||||
def http
|
def http
|
||||||
http = Net::HTTP.new(@site.host, @site.port)
|
http = Net::HTTP.new(@site.host, @site.port)
|
||||||
http.use_ssl = @site.is_a?(URI::HTTPS)
|
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.read_timeout = @timeout if @timeout # If timeout is not set, the default Net::HTTP timeout (60s) is used.
|
||||||
http
|
http
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue