diff options
author | Roman Arutyunyan <arut@nginx.com> | 2020-06-29 15:56:14 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2020-06-29 15:56:14 +0300 |
commit | 8d41d17a12509d6f80f51a27046b7a10882892ef (patch) | |
tree | 2d770af188c8fadec87f347cc88a19349c413b4a /src/http/v3/ngx_http_v3_module.c | |
parent | b7662c0e80003a676375be7d46071231321260e6 (diff) | |
download | nginx-8d41d17a12509d6f80f51a27046b7a10882892ef.tar.gz nginx-8d41d17a12509d6f80f51a27046b7a10882892ef.zip |
HTTP/3: http3_max_field_size directive to limit string size.
Client streams may send literal strings which are now limited in size by the
new directive. The default value is 4096.
The directive is similar to HTTP/2 directive http2_max_field_size.
Diffstat (limited to 'src/http/v3/ngx_http_v3_module.c')
-rw-r--r-- | src/http/v3/ngx_http_v3_module.c | 12 |
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 550b706da..17029934e 100644 --- a/src/http/v3/ngx_http_v3_module.c +++ b/src/http/v3/ngx_http_v3_module.c @@ -118,6 +118,13 @@ static ngx_command_t ngx_http_v3_commands[] = { offsetof(ngx_http_v3_srv_conf_t, quic.retry), NULL }, + { ngx_string("http3_max_field_size"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, + ngx_conf_set_size_slot, + NGX_HTTP_SRV_CONF_OFFSET, + offsetof(ngx_http_v3_srv_conf_t, max_field_size), + NULL }, + ngx_null_command }; @@ -268,6 +275,8 @@ ngx_http_v3_create_srv_conf(ngx_conf_t *cf) v3cf->quic.retry = NGX_CONF_UNSET; + v3cf->max_field_size = NGX_CONF_UNSET_SIZE; + return v3cf; } @@ -329,6 +338,9 @@ ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) } } + ngx_conf_merge_size_value(conf->max_field_size, + prev->max_field_size, + NGX_HTTP_V3_DEFAULT_MAX_FIELD_SIZE); return NGX_CONF_OK; } |