From f18c630eea5ee12268ad720f891ad39d0f778565 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 28 Sep 2013 13:16:10 -0700 Subject: NHP handles no SSL now --- lib/bundler/fetcher.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/bundler/fetcher.rb') 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 -- cgit v1.2.1