diff options
author | Jannis Hermanns <jannis@gmail.com> | 2013-03-19 17:28:00 +0100 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2013-03-20 17:48:52 -0700 |
commit | 257569732c458e9ffbfa40ff94f40a709703ec73 (patch) | |
tree | d5793242c19259c8c7706a2a2a1435d2efb0c9bd | |
parent | 77e3462715d432fd00cbf623abfe8c6fd5585115 (diff) | |
download | bundler-257569732c458e9ffbfa40ff94f40a709703ec73.tar.gz |
Don't forget basic_auth in non persistent mode
When there's no OpenSSL, `USE_PERSISTENT` becomes false. This causes
password protected gem servers to not work, because we're only using
host, port and path for the request (but not the full url with user
and password, as with `USE_PERSISTENT`:
```ruby
if USE_PERSISTENT
response = @connection.request(uri) # Contains user/password
else
req = Net::HTTP::Get.new uri.request_uri # Contains only path
response = @connection.request(req)
end
```
-rw-r--r-- | lib/bundler/fetcher.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb index 6f9d69ba08..6ef2840619 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -202,6 +202,7 @@ module Bundler response = @connection.request(uri) else req = Net::HTTP::Get.new uri.request_uri + req.basic_auth(uri.user, uri.password) if uri.user response = @connection.request(req) end rescue OpenSSL::SSL::SSLError |