lib/puppet/forge/repository.rb
# Return a Net::HTTPResponse read from this HTTPRequest +request+.
#
# @param request [Net::HTTPRequest] request to make
# @return [Net::HTTPResponse] response from request
# @raise [Puppet::Forge::Errors::CommunicationError] if there is a network
#   related error
# @raise [Puppet::Forge::Errors::SSLVerifyError] if there is a problem
#  verifying the remote SSL certificate
Return a Net::HTTPResponse read from this HTTPRequest +request+.
Return a Net :: HTTPResponse read from this HTTPRequest + request + .
def read_response(request)
      http_object = get_http_object
      http_object.start do |http|
        http.request(request)
      end
    rescue *NET_HTTP_EXCEPTIONS => e
      raise CommunicationError.new(:uri => @uri.to_s, :original => e)
    rescue OpenSSL::SSL::SSLError => e
      if e.message =~ /certificate verify failed/
        raise SSLVerifyError.new(:uri => @uri.to_s, :original => e)
      else
        raise e
      end
    end
def read_response ( request ) http_object = get_http_object http_object . start do | http | http . request ( request ) end rescue * NET_HTTP_EXCEPTIONS => e raise CommunicationError . new ( :uri => @uri . to_s , :original => e ) rescue OpenSSL :: SSL :: SSLError => e if e . message =~ / certificate verify failed / raise SSLVerifyError . new ( :uri => @uri . to_s , :original => e ) else raise e end end
Return a Net::HTTPResponse read from this HTTPRequest +request+.
Return a Net :: HTTPResponse read from this HTTPRequest + request + .
response from request
response from request
Net::HTTPResponse
[Puppet::Forge::Errors::CommunicationError] if there is a network related error
[ Puppet :: Forge :: Errors :: CommunicationError ] if there is a network related error
[Puppet::Forge::Errors::SSLVerifyError] if there is a problem verifying the remote SSL certificate
[ Puppet :: Forge :: Errors :: SSLVerifyError ] if there is a problem verifying the remote SSL certificate
request
request to make
request to make