aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_module.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2021-07-29 12:17:56 +0300
committerRoman Arutyunyan <arut@nginx.com>2021-07-29 12:17:56 +0300
commit2f833198b8229842dbbc57f7e86b00b19ed3b294 (patch)
tree9dd5a834dd87b8b77d879906018179df6dd43a7d /src/http/v3/ngx_http_v3_module.c
parent7a8fa1182812cd2408f2fe404b3ec6de35b9299c (diff)
downloadnginx-2f833198b8229842dbbc57f7e86b00b19ed3b294.tar.gz
nginx-2f833198b8229842dbbc57f7e86b00b19ed3b294.zip
HTTP/3: http3_max_uni_streams directive.
The directive limits the number of uni streams client is allowed to create.
Diffstat (limited to 'src/http/v3/ngx_http_v3_module.c')
-rw-r--r--src/http/v3/ngx_http_v3_module.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/http/v3/ngx_http_v3_module.c b/src/http/v3/ngx_http_v3_module.c
index 3b651f044..873ebb2f3 100644
--- a/src/http/v3/ngx_http_v3_module.c
+++ b/src/http/v3/ngx_http_v3_module.c
@@ -42,6 +42,13 @@ static ngx_command_t ngx_http_v3_commands[] = {
offsetof(ngx_http_v3_srv_conf_t, max_concurrent_pushes),
NULL },
+ { ngx_string("http3_max_uni_streams"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_num_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_http_v3_srv_conf_t, max_uni_streams),
+ NULL },
+
{ ngx_string("http3_push"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_http_v3_push,
@@ -104,6 +111,7 @@ ngx_http_v3_create_srv_conf(ngx_conf_t *cf)
h3scf->max_table_capacity = NGX_CONF_UNSET_SIZE;
h3scf->max_blocked_streams = NGX_CONF_UNSET_UINT;
h3scf->max_concurrent_pushes = NGX_CONF_UNSET_UINT;
+ h3scf->max_uni_streams = NGX_CONF_UNSET_UINT;
return h3scf;
}
@@ -127,6 +135,10 @@ ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
prev->max_concurrent_pushes,
NGX_HTTP_V3_DEFAULT_MAX_CONCURRENT_PUSHES);
+ ngx_conf_merge_uint_value(conf->max_uni_streams,
+ prev->max_uni_streams,
+ NGX_HTTP_V3_DEFAULT_MAX_UNI_STREAMS);
+
return NGX_CONF_OK;
}