summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-09-28 13:16:10 -0700
committerAndre Arko <andre@arko.net>2013-09-28 13:32:13 -0700
commitf18c630eea5ee12268ad720f891ad39d0f778565 (patch)
tree7864a54fcff034e41a86c52b28b83931019f4b57
parent53601b595a4068d2d4e0c4d34635e542423d6e95 (diff)
downloadbundler-f18c630eea5ee12268ad720f891ad39d0f778565.tar.gz
NHP handles no SSL now
-rw-r--r--lib/bundler/fetcher.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index ce049c9d1b..cc66e9b796 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -247,9 +247,9 @@ module Bundler
HTTP_ERRORS = [
Timeout::Error, EOFError, SocketError,
Errno::EINVAL, Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EAGAIN,
- Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError
+ Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
+ Net::HTTP::Persistent::Error
]
- HTTP_ERRORS << Net::HTTP::Persistent::Error if defined?(Net::HTTP::Persistent)
def fetch(uri, counter = 0)
raise HTTPError, "Too many redirects" if counter >= @redirect_limit
@@ -258,11 +258,7 @@ module Bundler
Bundler.ui.debug "Fetching from: #{uri}"
req = Net::HTTP::Get.new uri.request_uri
req.basic_auth(uri.user, uri.password) if uri.user
- if defined?(Net::HTTP::Persistent)
- response = @connection.request(uri, req)
- else
- response = @connection.request(req)
- end
+ response = @connection.request(uri, req)
rescue OpenSSL::SSL::SSLError
raise CertificateFailureError.new(@public_uri)
rescue *HTTP_ERRORS