diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 23:17:14 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 23:17:14 +0000 |
commit | e57ec6f78194e1cd7bb74b47cda1eab065e2d39a (patch) | |
tree | dc4d7f9e8b82e6c38bd37b7d2bd6d8e8cd879e2e /net/proxy/proxy_server.h | |
parent | e5a99ff3bd91f5493e7916b9dca6b29429ce0f43 (diff) | |
download | chromium_src-e57ec6f78194e1cd7bb74b47cda1eab065e2d39a.zip chromium_src-e57ec6f78194e1cd7bb74b47cda1eab065e2d39a.tar.gz chromium_src-e57ec6f78194e1cd7bb74b47cda1eab065e2d39a.tar.bz2 |
Change the host() method of ProxyServer to strip the
square brackets around an IPv6 literal address. Rename
the method HostNoBrackets() to be consistent with GURL's
new HostNoBrackets() method.
When resolving an address, use the new HostNoBrackets()
method instead of host().
Part of this changelist was contributed by Paul Marks
of Google.
Original review: http://codereview.chromium.org/115342
R=eroman
http://crbug.com/12005
TEST=covered by new test cases in unit test
Review URL: http://codereview.chromium.org/114029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_server.h')
-rw-r--r-- | net/proxy/proxy_server.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/proxy/proxy_server.h b/net/proxy/proxy_server.h index 0cf792c..a3d5ca8 100644 --- a/net/proxy/proxy_server.h +++ b/net/proxy/proxy_server.h @@ -48,8 +48,10 @@ class ProxyServer { return scheme_ == SCHEME_SOCKS4 || scheme_ == SCHEME_SOCKS5; } - // Gets the host portion of the proxy server. - const std::string& host() const; + // Gets the host portion of the proxy server. If the host portion is an + // IPv6 literal address, the return value does not include the square + // brackets ([]) used to separate it from the port portion. + std::string HostNoBrackets() const; // Gets the port portion of the proxy server. int port() const; |