Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: net/tools/quic/quic_simple_client_bin.cc

Issue 1531783002: Turn on the trailers support flag in the toy QUIC client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110177994
Patch Set: use FLAGS_quic_supports_trailers = true Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_client_bin.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A binary wrapper for QuicClient. 5 // A binary wrapper for QuicClient.
6 // Connects to a host using QUIC, sends a request to the provided URL, and 6 // Connects to a host using QUIC, sends a request to the provided URL, and
7 // displays the response. 7 // displays the response.
8 // 8 //
9 // Some usage examples: 9 // Some usage examples:
10 // 10 //
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 int main(int argc, char *argv[]) { 121 int main(int argc, char *argv[]) {
122 base::CommandLine::Init(argc, argv); 122 base::CommandLine::Init(argc, argv);
123 base::CommandLine* line = base::CommandLine::ForCurrentProcess(); 123 base::CommandLine* line = base::CommandLine::ForCurrentProcess();
124 const base::CommandLine::StringVector& urls = line->GetArgs(); 124 const base::CommandLine::StringVector& urls = line->GetArgs();
125 125
126 logging::LoggingSettings settings; 126 logging::LoggingSettings settings;
127 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 127 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
128 CHECK(logging::InitLogging(settings)); 128 CHECK(logging::InitLogging(settings));
129 129
130 FLAGS_quic_supports_trailers = true;
131
130 if (line->HasSwitch("h") || line->HasSwitch("help") || urls.empty()) { 132 if (line->HasSwitch("h") || line->HasSwitch("help") || urls.empty()) {
131 const char* help_str = 133 const char* help_str =
132 "Usage: quic_client [options] <url>\n" 134 "Usage: quic_client [options] <url>\n"
133 "\n" 135 "\n"
134 "<url> with scheme must be provided (e.g. http://www.google.com)\n\n" 136 "<url> with scheme must be provided (e.g. http://www.google.com)\n\n"
135 "Options:\n" 137 "Options:\n"
136 "-h, --help show this help message and exit\n" 138 "-h, --help show this help message and exit\n"
137 "--host=<host> specify the IP address of the hostname to " 139 "--host=<host> specify the IP address of the hostname to "
138 "connect to\n" 140 "connect to\n"
139 "--port=<port> specify the port to connect to\n" 141 "--port=<port> specify the port to connect to\n"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return 0; 328 return 0;
327 } else { 329 } else {
328 cout << "Request failed (redirect " << response_code << ")." << endl; 330 cout << "Request failed (redirect " << response_code << ")." << endl;
329 return 1; 331 return 1;
330 } 332 }
331 } else { 333 } else {
332 cerr << "Request failed (" << response_code << ")." << endl; 334 cerr << "Request failed (" << response_code << ")." << endl;
333 return 1; 335 return 1;
334 } 336 }
335 } 337 }
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_bin.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698