summaryrefslogtreecommitdiffstats
path: root/net/base/host_port_pair.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 22:20:54 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 22:20:54 +0000
commit2ff8b3133033d6130ea87df3ab2290a226c7bca7 (patch)
tree74ee45d17428c359a0bd8db8b97e51eeb4b7c44c /net/base/host_port_pair.h
parent106113b3dde22f7d8b3a7f9a00a8884668cda782 (diff)
downloadchromium_src-2ff8b3133033d6130ea87df3ab2290a226c7bca7.zip
chromium_src-2ff8b3133033d6130ea87df3ab2290a226c7bca7.tar.gz
chromium_src-2ff8b3133033d6130ea87df3ab2290a226c7bca7.tar.bz2
SPDY: Fix Alternate-Protocol.
(1) In DoInitConnection() we do the existing spdy session check. If it exists there, then we assuem it exists in DoSpdySendRequest(). Unfortunately, we didn't do the same check. Use a member variable to store the HostPortPair. (2) In DoInitConnection(), we used the scheme://urlhost:urlport as the connection group. With Alternate-Protocol, we used the scheme://urlhost:urlport even though we were connecting to a different port, with a different protocol (TLS). This means we would mix conflicting sockets in the ClientSocketPool. I fix this by dropping scheme://, since it's unnecessary, and would cause us not to share SSL sockets in different connection groups (since the specified scheme might be http://, but due to Alternate-Protocol, we actually do an SSL connect). I also don't use the urlhost:urlport, but use the host:port that we actually connect to. TODO(willchan): Fix Alternate-Protocol so it works properly with proxies. I need to change CONNECT for http proxies and patch the SOCKs connects. Review URL: http://codereview.chromium.org/1755005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_port_pair.h')
-rw-r--r--net/base/host_port_pair.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/base/host_port_pair.h b/net/base/host_port_pair.h
index ab7f312..547e898 100644
--- a/net/base/host_port_pair.h
+++ b/net/base/host_port_pair.h
@@ -11,9 +11,9 @@
namespace net {
struct HostPortPair {
- HostPortPair() {}
- HostPortPair(const std::string& in_host, uint16 in_port)
- : host(in_host), port(in_port) {}
+ HostPortPair();
+ // If |in_host| represents an IPv6 address, it should not bracket the address.
+ HostPortPair(const std::string& in_host, uint16 in_port);
// Comparator function so this can be placed in a std::map.
bool operator<(const HostPortPair& other) const {
@@ -22,8 +22,12 @@ struct HostPortPair {
return port < other.port;
}
+ // ToString() will convert the HostPortPair to "host:port". If |host| is an
+ // IPv6 literal, it will add brackets around |host|.
std::string ToString() const;
+ // If |host| represents an IPv6 address, this string will not contain brackets
+ // around the address.
std::string host;
uint16 port;
};