diff options
author | David Garcia Quintas <dgq@google.com> | 2016-11-28 11:08:25 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-11-28 11:08:25 -0800 |
commit | f4936517723ce63dcb1deca6c2c07dfab6fa1497 (patch) | |
tree | dd1ebc1acb98362438f9df9e307050c2ec050a3e /src/core/ext | |
parent | 1edfb952d0aa12bdc154e85eab24e87621292366 (diff) | |
parent | d960c8b166eb1160714d3532d567364722940137 (diff) |
Merge branch 'master' of github.com:grpc/grpc into backoff
Diffstat (limited to 'src/core/ext')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 127e1cdc13..4e3c7ff681 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -954,6 +954,16 @@ static void complete_fetch(grpc_exec_ctx *exec_ctx, void *gs, static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} +static void log_metadata(const grpc_metadata_batch *md_batch, uint32_t id, + bool is_client, bool is_initial) { + for (grpc_linked_mdelem *md = md_batch->list.head; md != md_batch->list.tail; + md = md->next) { + gpr_log(GPR_INFO, "HTTP:%d:%s:%s: %s: %s", id, is_initial ? "HDR" : "TRL", + is_client ? "CLI" : "SVR", grpc_mdstr_as_c_string(md->md->key), + grpc_mdstr_as_c_string(md->md->value)); + } +} + static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, grpc_error *error_ignored) { GPR_TIMER_BEGIN("perform_stream_op_locked", 0); @@ -967,6 +977,12 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, gpr_log(GPR_DEBUG, "perform_stream_op_locked: %s; on_complete = %p", str, op->on_complete); gpr_free(str); + if (op->send_initial_metadata) { + log_metadata(op->send_initial_metadata, s->id, t->is_client, true); + } + if (op->send_trailing_metadata) { + log_metadata(op->send_trailing_metadata, s->id, t->is_client, false); + } } grpc_closure *on_complete = op->on_complete; |