summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-07-31 15:52:45 -0700
committerAndre Arko <andre@arko.net>2013-07-31 15:52:45 -0700
commita20d093954c5693cefef9418316286ff8e0fed38 (patch)
tree72b70e7b8397b65fc2afd58543cc7849c88b313e
parente647b5f8fe84ef54d4999b2f65ba37253caeb088 (diff)
downloadbundler-a20d093954c5693cefef9418316286ff8e0fed38.tar.gz
fix basic_auth for net-http-persistent
-rw-r--r--lib/bundler/fetcher.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 9c8e155ce1..9f6c99a137 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -209,11 +209,11 @@ module Bundler
begin
Bundler.ui.debug "Fetching from: #{uri}"
+ req = Net::HTTP::Get.new uri.request_uri
+ req.basic_auth(uri.user, uri.password) if uri.user && uri.password
if defined?(Net::HTTP::Persistent)
- response = @connection.request(uri)
+ response = @connection.request(uri, req)
else
- req = Net::HTTP::Get.new uri.request_uri
- req.basic_auth(uri.user, uri.password) if uri.user && uri.password
response = @connection.request(req)
end
rescue OpenSSL::SSL::SSLError