| 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 f8526ad227f9ebdc1fe62008ecd3ab5c37d2c8d6..d37a626fb9ce0d87298c3a91f8f71cf18ecc473d 100644
|
| --- a/net/tools/quic/quic_client_bin.cc
|
| +++ b/net/tools/quic/quic_client_bin.cc
|
| @@ -47,6 +47,7 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_util.h"
|
| +#include "base/strings/stringprintf.h"
|
| #include "net/base/ip_endpoint.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/base/privacy_mode.h"
|
| @@ -335,7 +336,12 @@ int main(int argc, char *argv[]) {
|
| if (!FLAGS_quiet) {
|
| cout << "Request:" << endl;
|
| cout << "headers:" << header_block.DebugString();
|
| - cout << "body: " << body << endl;
|
| + string body_to_print = body;
|
| + if (!FLAGS_body_hex.empty()) {
|
| + // Print the user provided hex, rather than binary body.
|
| + body_to_print = base::StringPrintf("(hex) 0x%s", FLAGS_body_hex.c_str());
|
| + }
|
| + cout << "body: " << body_to_print << endl;
|
| cout << endl;
|
| cout << "Response:" << endl;
|
| cout << "headers: " << client.latest_response_headers() << endl;
|
|
|