class Aws::Signers::V2

def host(endpoint)

def host(endpoint)
  host = endpoint.host.downcase
  if
    (endpoint.scheme == 'http' && endpoint.port != 80) ||
    (endpoint.scheme == 'https' && endpoint.port != 443)
  then
    host += ":#{endpoint.port}"
  end
  host
end