module HTTPClient::Util
def uri_part_of(uri, part)
* the same port number
* the same host String (no host resolution or IP-addr conversion)
* the same scheme
Returns true if the given 2 URIs have a part_of relationship.
def uri_part_of(uri, part) ((uri.scheme == part.scheme) and (uri.host == part.host) and (uri.port == part.port) and uri.path.upcase.index(part.path.upcase) == 0) end