cloudclient_proxy.patch
/usr/lib/one/ruby/cloud/CloudClient.rb 2012-08-02 23:44:52.190503423 +0200 | ||
---|---|---|
83 | 83 |
# is set if needed. |
84 | 84 |
# ######################################################################### |
85 | 85 |
def self.http_start(url, timeout, &block) |
86 |
http = Net::HTTP.new(url.host, url.port) |
|
86 |
proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new |
|
87 |
http = Net::HTTP::Proxy(proxy.host, proxy.port).new(url.host, url.port) |
|
87 | 88 | |
88 | 89 |
if timeout |
89 | 90 |
http.read_timeout = timeout.to_i |