Skip to content

Commit

Permalink
fix http refresh_connection to work with ssl again
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskite committed Feb 22, 2011
1 parent 324033e commit 6b87f92
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/anemone/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,16 @@ def connection(url)
end

def refresh_connection(url)
http = Net::HTTP::Proxy(proxy_host, proxy_port)
http = Net::HTTP.new(url.host, url.port, proxy_host, proxy_port)

http.read_timeout = read_timeout if !!read_timeout

if url.scheme == 'https'
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
@connections[url.host][url.port] = http.start(url.host, url.port)

@connections[url.host][url.port] = http.start
end

def verbose?
Expand Down

0 comments on commit 6b87f92

Please sign in to comment.