method

update_uri

update_uri(host, port, ssl)
public

No documentation available.

# File lib/net/http/generic_request.rb, line 140
  def update_uri(host, port, ssl) # :nodoc: internal use only
    return unless @uri

    @uri.host ||= host
    @uri.port = port

    scheme = ssl ? 'https' : 'http'

    # convert the class of the URI
    unless scheme == @uri.scheme then
      new_uri = @uri.to_s.sub(/^https?/, scheme)
      @uri = URI new_uri
    end

    @uri
  end