mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-08 02:58:53 +08:00
Never indexing still can use header field name in dynamic table
This commit is contained in:
@@ -1208,9 +1208,6 @@ static search_result search_hd_table(nghttp2_hd_context *context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search dynamic table first, so that we can find recently used
|
|
||||||
entry first */
|
|
||||||
if (indexing_mode != NGHTTP2_HD_NEVER_INDEXING) {
|
|
||||||
for (i = 0; i < context->hd_table.len; ++i) {
|
for (i = 0; i < context->hd_table.len; ++i) {
|
||||||
nghttp2_hd_entry *ent = hd_ringbuf_get(&context->hd_table, i);
|
nghttp2_hd_entry *ent = hd_ringbuf_get(&context->hd_table, i);
|
||||||
if (ent->token != token || (token == -1 && !name_eq(&ent->nv, nv))) {
|
if (ent->token != token || (token == -1 && !name_eq(&ent->nv, nv))) {
|
||||||
@@ -1221,13 +1218,12 @@ static search_result search_hd_table(nghttp2_hd_context *context,
|
|||||||
res.index = (ssize_t)(i + NGHTTP2_STATIC_TABLE_LENGTH);
|
res.index = (ssize_t)(i + NGHTTP2_STATIC_TABLE_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value_eq(&ent->nv, nv)) {
|
if (indexing_mode != NGHTTP2_HD_NEVER_INDEXING && value_eq(&ent->nv, nv)) {
|
||||||
res.index = (ssize_t)(i + NGHTTP2_STATIC_TABLE_LENGTH);
|
res.index = (ssize_t)(i + NGHTTP2_STATIC_TABLE_LENGTH);
|
||||||
res.name_value_match = 1;
|
res.name_value_match = 1;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user