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..52cfad301149323ca869435216d00581bfa2459b 100644 |
--- a/net/tools/quic/quic_client_bin.cc |
+++ b/net/tools/quic/quic_client_bin.cc |
@@ -335,7 +335,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 = StrCat("(hex) 0x", FLAGS_body_hex); |
Ryan Hamilton
2015/12/21 17:39:29
Does this compile? I don't think we have StrCat in
|
+ } |
+ cout << "body: " << body_to_print << endl; |
cout << endl; |
cout << "Response:" << endl; |
cout << "headers: " << client.latest_response_headers() << endl; |