Permalink
Browse files

fix fetching proxy user/password

  • Loading branch information...
1 parent 4563164 commit 99c86b3eb42208312e7eab32c22bb1d40417967d @mislav mislav committed Jan 19, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/hub/commands.rb
View
@@ -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)

0 comments on commit 99c86b3

Please sign in to comment.