| Index: src/gurl.h
|
| ===================================================================
|
| --- src/gurl.h (revision 101)
|
| +++ src/gurl.h (working copy)
|
| @@ -242,6 +242,9 @@
|
| std::string password() const {
|
| return ComponentString(parsed_.password);
|
| }
|
| + // Note that this may be a hostname, an IPv4 address, or an IPv6 literal
|
| + // surrounded by square brackets, like "[2001:db8::1]". To exclude these
|
| + // brackets, use HostNoBrackets() below.
|
| std::string host() const {
|
| return ComponentString(parsed_.host);
|
| }
|
| @@ -307,6 +310,10 @@
|
| // parameter, and query portions of the URL. It is guaranteed to be ASCII.
|
| std::string PathForRequest() const;
|
|
|
| + // Returns the host, excluding the square brackets surrounding IPv6 address
|
| + // literals. This can be useful for passing to getaddrinfo().
|
| + std::string HostNoBrackets() const;
|
| +
|
| // Returns true if this URL's host matches or is in the same domain as
|
| // the given input string. For example if this URL was "www.google.com",
|
| // this would match "com", "google.com", and "www.google.com
|
|
|