Skip to content

Commit

Permalink
Merge pull request rubinius#2747 from caarlos0/fixes-configure-proxy
Browse files Browse the repository at this point in the history
Fixed download of https urls under proxy
  • Loading branch information
dbussink committed Oct 29, 2013
2 parents 4892d3f + 85e0180 commit 4151f8e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions configure
Expand Up @@ -558,13 +558,12 @@ Unsupported language version requested: #{version}. Options are #{@supported_ver
uri = url.kind_of?(URI) ? url : URI(url)

if ENV['http_proxy']
protocol, userinfo, host, port = URI::split(ENV['http_proxy'])
proxy_user, proxy_pass = userinfo.split(/:/) if userinfo
http = Net::HTTP::Proxy(host, port, proxy_user, proxy_pass)
protocol, userinfo, p_host, p_port = URI::split(ENV['http_proxy'])
p_user, p_pass = userinfo.split(/:/) if userinfo
http = Net::HTTP.new(uri.host, uri.port, p_host, p_port, p_user, p_pass)
else
http = Net::HTTP.new(uri.host, uri.port)
end

http.use_ssl = true if uri.scheme == 'https'
request = Net::HTTP::Get.new(uri.request_uri)

Expand Down

0 comments on commit 4151f8e

Please sign in to comment.