mirror of
https://github.com/nginx/nginx.git
synced 2026-10-24 22:57:43 -05:00
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:
1 parent
ab976ab39a
commit
875750a4f7
1 file changed
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user