| 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 e14843e48c9e60a767b90373083935089d51205c..bc8cf12bc9ca272154735dbeafe0ffb865674474 100644
|
| --- a/net/tools/quic/quic_client_bin.cc
|
| +++ b/net/tools/quic/quic_client_bin.cc
|
| @@ -92,6 +92,8 @@ bool FLAGS_version_mismatch_ok = false;
|
| // If true, an HTTP response code of 3xx is considered to be a successful
|
| // response, otherwise a failure.
|
| bool FLAGS_redirect_is_success = true;
|
| +// Initial MTU of the connection.
|
| +int32 FLAGS_initial_mtu = 0;
|
|
|
| int main(int argc, char *argv[]) {
|
| base::CommandLine::Init(argc, argv);
|
| @@ -120,7 +122,9 @@ int main(int argc, char *argv[]) {
|
| "--version_mismatch_ok if specified a version mismatch in the "
|
| "handshake is not considered a failure\n"
|
| "--redirect_is_success if specified an HTTP response code of 3xx "
|
| - "is considered to be a successful response, otherwise a failure\n";
|
| + "is considered to be a successful response, otherwise a failure\n"
|
| + "--initial_mtu=<initial_mtu> specify the initial MTU of the connection"
|
| + "\n";
|
| cout << help_str;
|
| exit(0);
|
| }
|
| @@ -155,13 +159,21 @@ int main(int argc, char *argv[]) {
|
| if (line->HasSwitch("redirect_is_success")) {
|
| FLAGS_redirect_is_success = true;
|
| }
|
| + if (line->HasSwitch("initial_mtu")) {
|
| + if (!base::StringToInt(line->GetSwitchValueASCII("initial_mtu"),
|
| + &FLAGS_initial_mtu)) {
|
| + std::cerr << "--initial_mtu must be an integer\n";
|
| + return 1;
|
| + }
|
| + }
|
|
|
| VLOG(1) << "server host: " << FLAGS_host << " port: " << FLAGS_port
|
| << " body: " << FLAGS_body << " headers: " << FLAGS_headers
|
| << " quiet: " << FLAGS_quiet
|
| << " quic-version: " << FLAGS_quic_version
|
| << " version_mismatch_ok: " << FLAGS_version_mismatch_ok
|
| - << " redirect_is_success: " << FLAGS_redirect_is_success;
|
| + << " redirect_is_success: " << FLAGS_redirect_is_success
|
| + << " initial_mtu: " << FLAGS_initial_mtu;
|
|
|
| base::AtExitManager exit_manager;
|
|
|
| @@ -203,6 +215,9 @@ int main(int argc, char *argv[]) {
|
| versions, &epoll_server);
|
| scoped_ptr<CertVerifier> cert_verifier;
|
| scoped_ptr<TransportSecurityState> transport_security_state;
|
| + if (FLAGS_initial_mtu != 0) {
|
| + client.set_initial_max_packet_length(FLAGS_initial_mtu);
|
| + }
|
| if (is_https) {
|
| // For secure QUIC we need to verify the cert chain.a
|
| cert_verifier.reset(CertVerifier::CreateDefault());
|
|
|