Log response headers in the MASQUE OHTTP client in addition to the response body. Also include some headers that we were using indirectly. PiperOrigin-RevId: 742895911
diff --git a/quiche/quic/masque/masque_ohttp_client_bin.cc b/quiche/quic/masque/masque_ohttp_client_bin.cc index 7a45733..df2aca2 100644 --- a/quiche/quic/masque/masque_ohttp_client_bin.cc +++ b/quiche/quic/masque/masque_ohttp_client_bin.cc
@@ -28,6 +28,8 @@ #include "quiche/common/platform/api/quiche_command_line_flags.h" #include "quiche/common/platform/api/quiche_logging.h" #include "quiche/common/platform/api/quiche_system_event_loop.h" +#include "quiche/oblivious_http/buffers/oblivious_http_request.h" +#include "quiche/oblivious_http/buffers/oblivious_http_response.h" #include "quiche/oblivious_http/common/oblivious_http_header_key_config.h" #include "quiche/oblivious_http/oblivious_http_client.h" @@ -126,8 +128,12 @@ absl::StatusOr<BinaryHttpResponse> binary_response = BinaryHttpResponse::Create(ohttp_response->GetPlaintextData()); if (binary_response.ok()) { - QUICHE_LOG(INFO) << "Successfully decoded OHTTP response: " - << binary_response->body(); + QUICHE_LOG(INFO) << "Successfully decoded OHTTP response:"; + for (const quiche::BinaryHttpMessage::Field &field : + binary_response->GetHeaderFields()) { + QUICHE_LOG(INFO) << field.name << ": " << field.value; + } + QUICHE_LOG(INFO) << "Body:" << std::endl << binary_response->body(); } else { QUICHE_LOG(ERROR) << "Failed to parse binary response: " << binary_response.status();