From 816ad2102fe1e0c4e47a2160e1958dfdc2cbabc9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 4 Mar 2019 23:22:18 +0900 Subject: [PATCH] Reuse name when indexing header by referencing dynamic table --- lib/nghttp2_hd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index a61f0d47..11ca3345 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -1390,7 +1390,7 @@ static int deflate_nv(nghttp2_hd_deflater *deflater, nghttp2_bufs *bufs, if (indexing_mode == NGHTTP2_HD_WITH_INDEXING) { nghttp2_hd_nv hd_nv; - if (idx != -1 && idx < (ssize_t)NGHTTP2_STATIC_TABLE_LENGTH) { + if (idx != -1) { hd_nv.name = nghttp2_hd_table_get(&deflater->ctx, (size_t)idx).name; nghttp2_rcbuf_incref(hd_nv.name); } else {