|
|
@ -1332,12 +1332,17 @@ static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id, |
|
|
|
bool is_client, bool is_initial) { |
|
|
|
bool is_client, bool is_initial) { |
|
|
|
for (grpc_linked_mdelem* md = md_batch->list.head; md != nullptr; |
|
|
|
for (grpc_linked_mdelem* md = md_batch->list.head; md != nullptr; |
|
|
|
md = md->next) { |
|
|
|
md = md->next) { |
|
|
|
char* key = grpc_slice_to_c_string(GRPC_MDKEY(md->md)); |
|
|
|
if (is_valid_mdelem_index(md->md_index)) { |
|
|
|
char* value = grpc_slice_to_c_string(GRPC_MDVALUE(md->md)); |
|
|
|
gpr_log(GPR_INFO, "HTTP:%d:%s:%s: hpack table index: %d", id, is_initial ? "HDR" : "TRL", |
|
|
|
gpr_log(GPR_INFO, "HTTP:%d:%s:%s: %s: %s", id, is_initial ? "HDR" : "TRL", |
|
|
|
is_client ? "CLI" : "SVR", md->md_index); |
|
|
|
is_client ? "CLI" : "SVR", key, value); |
|
|
|
} else { |
|
|
|
gpr_free(key); |
|
|
|
char* key = grpc_slice_to_c_string(GRPC_MDKEY(md->md)); |
|
|
|
gpr_free(value); |
|
|
|
char* value = grpc_slice_to_c_string(GRPC_MDVALUE(md->md)); |
|
|
|
|
|
|
|
gpr_log(GPR_INFO, "HTTP:%d:%s:%s: %s: %s", id, is_initial ? "HDR" : "TRL", |
|
|
|
|
|
|
|
is_client ? "CLI" : "SVR", key, value); |
|
|
|
|
|
|
|
gpr_free(key); |
|
|
|
|
|
|
|
gpr_free(value); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|