| Index: net/tools/quic/quic_client_bin.cc
|
| diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
|
| index 7fb9dc49298f7090cc6e42c8edf393d8592c3b4b..871c3ae272fb0931e21bfe82103b1a5b7dc83655 100644
|
| --- a/net/tools/quic/quic_client_bin.cc
|
| +++ b/net/tools/quic/quic_client_bin.cc
|
| @@ -180,13 +180,15 @@ int main(int argc, char *argv[]) {
|
| // Determine IP address to connect to from supplied hostname.
|
| net::IPAddressNumber ip_addr;
|
|
|
| - // TODO(rtenneti): GURL's doesn't support default_protocol argument, thus
|
| - // protocol is required in the URL.
|
| GURL url(urls[0]);
|
| string host = FLAGS_host;
|
| if (host.empty()) {
|
| host = url.host();
|
| }
|
| + int port = FLAGS_port;
|
| + if (port == 0) {
|
| + port = url.EffectiveIntPort();
|
| + }
|
| if (!net::ParseIPLiteralToNumber(host, &ip_addr)) {
|
| net::AddressList addresses;
|
| int rv = net::tools::SynchronousHostResolver::Resolve(host, &addresses);
|
| @@ -198,19 +200,19 @@ int main(int argc, char *argv[]) {
|
| ip_addr = addresses[0].address();
|
| }
|
|
|
| - string host_port = net::IPAddressToStringWithPort(ip_addr, FLAGS_port);
|
| + string host_port = net::IPAddressToStringWithPort(ip_addr, port);
|
| VLOG(1) << "Resolved " << host << " to " << host_port << endl;
|
|
|
| // Build the client, and try to connect.
|
| net::EpollServer epoll_server;
|
| - net::QuicServerId server_id(url.host(), FLAGS_port, /*is_https=*/true,
|
| + net::QuicServerId server_id(url.host(), url.port(), /*is_https=*/true,
|
| net::PRIVACY_MODE_DISABLED);
|
| net::QuicVersionVector versions = net::QuicSupportedVersions();
|
| if (FLAGS_quic_version != -1) {
|
| versions.clear();
|
| versions.push_back(static_cast<net::QuicVersion>(FLAGS_quic_version));
|
| }
|
| - net::tools::QuicClient client(net::IPEndPoint(ip_addr, FLAGS_port), server_id,
|
| + net::tools::QuicClient client(net::IPEndPoint(ip_addr, port), server_id,
|
| versions, &epoll_server);
|
| scoped_ptr<CertVerifier> cert_verifier;
|
| scoped_ptr<TransportSecurityState> transport_security_state;
|
|
|