HTTP/3: use max table capacity for insert buffer allocation

Previously, current capacity was used for the allocation, which could
be insufficient if table capacity was later increased.
This commit is contained in:
Roman Arutyunyan authored and Roman Arutyunyan committed 2026-06-17 07:40:35 -07:00
1 parent ab976ab39a
commit 875750a4f7
1 file changed
+5 -1
+5 -1
View File
@@ -159,13 +159,17 @@ ngx_buf_t *
ngx_http_v3_get_insert_buffer(ngx_connection_t *c)
{
ngx_http_v3_session_t *h3c;
ngx_http_v3_srv_conf_t *h3scf;
ngx_http_v3_dynamic_table_t *dt;
h3c = ngx_http_v3_get_session(c);
dt = &h3c->table;
if (dt->insert_buffer == NULL) {
dt->insert_buffer = ngx_create_temp_buf(c->pool, dt->capacity);
h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
dt->insert_buffer = ngx_create_temp_buf(c->pool,
h3scf->max_table_capacity);
if (dt->insert_buffer == NULL) {
return NULL;
}