summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher.rb
diff options
context:
space:
mode:
authorColin Curtin <colin.t.curtin@gmail.com>2013-02-12 15:21:20 -0800
committerAndre Arko <andre@arko.net>2013-02-12 22:05:51 -0800
commit727e64d28b62daf16a24cece987f484c01c82ed4 (patch)
tree1f9560a1aa17c2bef8566d607c605113780a4644 /lib/bundler/fetcher.rb
parent528d611f478ac608d53cea0db3e4a63e666ee40f (diff)
downloadbundler-727e64d28b62daf16a24cece987f484c01c82ed4.tar.gz
Don't carry over the user & pass unless the host is the same.
Diffstat (limited to 'lib/bundler/fetcher.rb')
-rw-r--r--lib/bundler/fetcher.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 1e3ee2b8da..cac36ad2dc 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -144,8 +144,10 @@ module Bundler
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")