Reuse name when indexing header by referencing dynamic table
This commit is contained in:
parent
f5feb16ef4
commit
816ad2102f
|
@ -1390,7 +1390,7 @@ static int deflate_nv(nghttp2_hd_deflater *deflater, nghttp2_bufs *bufs,
|
||||||
if (indexing_mode == NGHTTP2_HD_WITH_INDEXING) {
|
if (indexing_mode == NGHTTP2_HD_WITH_INDEXING) {
|
||||||
nghttp2_hd_nv hd_nv;
|
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;
|
hd_nv.name = nghttp2_hd_table_get(&deflater->ctx, (size_t)idx).name;
|
||||||
nghttp2_rcbuf_incref(hd_nv.name);
|
nghttp2_rcbuf_incref(hd_nv.name);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue