aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-23 13:04:34 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-11-23 13:04:34 -0800
commit7e1cfe14602902f1c0d3a3fbe91d268c9f4e7487 (patch)
tree5f2410224bb63bdf099157ff0de870d4c8df3fdf /src/core
parent83d64ee574b86a9400b2009d8030a7360d8ab3fd (diff)
Fix hpack parser string identification bug
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_parser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c
index 6c035f2788..9b85026b13 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c
@@ -1539,8 +1539,10 @@ static grpc_error *parse_key_string(grpc_exec_ctx *exec_ctx,
/* check if a key represents a binary header or not */
static bool is_binary_literal_header(grpc_chttp2_hpack_parser *p) {
- return grpc_is_binary_header(grpc_slice_from_static_buffer(
- p->key.data.copied.str, p->key.data.copied.length));
+ return grpc_is_binary_header(
+ p->key.copied ? grpc_slice_from_static_buffer(p->key.data.copied.str,
+ p->key.data.copied.length)
+ : p->key.data.referenced);
}
static grpc_error *is_binary_indexed_header(grpc_chttp2_hpack_parser *p,