aboutsummaryrefslogtreecommitdiff
path: root/src/core/ext/transport
diff options
context:
space:
mode:
authorHope Casey-Allen <hcaseyal@google.com>2018-08-28 20:22:15 -0700
committerHope Casey-Allen <hcaseyal@google.com>2018-08-28 20:37:18 -0700
commit73d0cd4d2d16e59a5b2ec21614b1511822e2039a (patch)
tree567da679b28fc263f5dd77e102af5d0e0f1f19a0 /src/core/ext/transport
parentee65a5eaee45a765d1d4176a797bb8288faeb180 (diff)
downloadgrpc-grpc-73d0cd4d2d16e59a5b2ec21614b1511822e2039a.tar.gz
Add ability to use static hpack table on the encode path
Diffstat (limited to 'src/core/ext/transport')
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
index 0eaf63f133..4ce139eb0d 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
@@ -692,7 +692,11 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor* c,
}
grpc_metadata_batch_assert_ok(metadata);
for (grpc_linked_mdelem* l = metadata->list.head; l; l = l->next) {
- hpack_enc(c, l->md, &st);
+ if (is_valid_mdelem_index(l->md_index)) {
+ emit_indexed(c, l->md_index, &st);
+ } else {
+ hpack_enc(c, l->md, &st);
+ }
}
grpc_millis deadline = metadata->deadline;
if (deadline != GRPC_MILLIS_INF_FUTURE) {