Skip to content

Commit

Permalink
fix fetching proxy user/password
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Jan 19, 2012
1 parent 4563164 commit 99c86b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/hub/commands.rb
Expand Up @@ -960,7 +960,11 @@ def setup_http(url)

http_args = [url.host, port]
if proxy = proxy_url(use_ssl)
http_args.concat proxy.select(:host, :port, :user, :password)
http_args.concat proxy.select(:host, :port)
if proxy.userinfo
require 'cgi'
http_args.concat proxy.userinfo.split(':', 2).map {|a| CGI.unescape a }
end
end

http = Net::HTTP.new(*http_args)
Expand Down

0 comments on commit 99c86b3

Please sign in to comment.