class HTTPClient::Util::AddressableURI

Public Instance Methods

authority() click to toggle source

Overwrites the original definition just for one line…

# File lib/httpclient/util.rb, line 32
def authority
  self.host && @authority ||= (begin
    authority = ""
    if self.userinfo != nil
      authority << "#{self.userinfo}@"
    end
    authority << self.host
    if self.port != self.default_port # ...HERE! Compares with default_port because self.port is not nil in this wrapper.
      authority << ":#{self.port}"
    end
    authority
  end)
end
port() click to toggle source

HTTPClient expects urify("foo/").port to be not nil but 80 like URI.

# File lib/httpclient/util.rb, line 47
def port
  super || default_port
end