Navigation Menu

Skip to content

Commit

Permalink
Ruby 1.9 compat: fix for SSL in Active Resource
Browse files Browse the repository at this point in the history
[#1272 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
bschwartz authored and jeremy committed Aug 7, 2009
1 parent 4b33155 commit e1d27ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activeresource/lib/active_resource/connection.rb
Expand Up @@ -188,7 +188,7 @@ def handle_response(response)
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
Expand Down

0 comments on commit e1d27ee

Please sign in to comment.