Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Don't carry over the user & pass unless the host is the same.
Browse files Browse the repository at this point in the history
  • Loading branch information
perplexes authored and indirect committed Feb 13, 2013
1 parent 528d611 commit 727e64d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/bundler/fetcher.rb
Expand Up @@ -144,8 +144,10 @@ def fetch(uri, counter = 0)
when Net::HTTPRedirection
Bundler.ui.debug("HTTP Redirection")
new_uri = URI.parse(response["location"])
new_uri.user = uri.user
new_uri.password = uri.password
if new_uri.host == uri.host
new_uri.user = uri.user
new_uri.password = uri.password
end
fetch(new_uri, counter + 1)
when Net::HTTPSuccess
Bundler.ui.debug("HTTP Success")
Expand Down

0 comments on commit 727e64d

Please sign in to comment.