comparison src/http/v3/ngx_http_v3_module.c @ 8317:ae2e68f206f9 quic

HTTP/3: removed http3_max_field_size. Instead, size of one large_client_header_buffers buffer is used.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 16 Feb 2021 18:50:01 +0300
parents 0596fe1aee16
children f0882db8c8d4
comparison
equal deleted inserted replaced
8316:13f7085b90d2 8317:ae2e68f206f9
21 void *child); 21 void *child);
22 static char *ngx_http_v3_push(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 22 static char *ngx_http_v3_push(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
23 23
24 24
25 static ngx_command_t ngx_http_v3_commands[] = { 25 static ngx_command_t ngx_http_v3_commands[] = {
26
27 { ngx_string("http3_max_field_size"),
28 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
29 ngx_conf_set_size_slot,
30 NGX_HTTP_SRV_CONF_OFFSET,
31 offsetof(ngx_http_v3_srv_conf_t, max_field_size),
32 NULL },
33 26
34 { ngx_string("http3_max_table_capacity"), 27 { ngx_string("http3_max_table_capacity"),
35 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, 28 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
36 ngx_conf_set_size_slot, 29 ngx_conf_set_size_slot,
37 NGX_HTTP_SRV_CONF_OFFSET, 30 NGX_HTTP_SRV_CONF_OFFSET,
155 h3scf = ngx_pcalloc(cf->pool, sizeof(ngx_http_v3_srv_conf_t)); 148 h3scf = ngx_pcalloc(cf->pool, sizeof(ngx_http_v3_srv_conf_t));
156 if (h3scf == NULL) { 149 if (h3scf == NULL) {
157 return NULL; 150 return NULL;
158 } 151 }
159 152
160 h3scf->max_field_size = NGX_CONF_UNSET_SIZE;
161 h3scf->max_table_capacity = NGX_CONF_UNSET_SIZE; 153 h3scf->max_table_capacity = NGX_CONF_UNSET_SIZE;
162 h3scf->max_blocked_streams = NGX_CONF_UNSET_UINT; 154 h3scf->max_blocked_streams = NGX_CONF_UNSET_UINT;
163 h3scf->max_concurrent_pushes = NGX_CONF_UNSET_UINT; 155 h3scf->max_concurrent_pushes = NGX_CONF_UNSET_UINT;
164 156
165 return h3scf; 157 return h3scf;
169 static char * 161 static char *
170 ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) 162 ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
171 { 163 {
172 ngx_http_v3_srv_conf_t *prev = parent; 164 ngx_http_v3_srv_conf_t *prev = parent;
173 ngx_http_v3_srv_conf_t *conf = child; 165 ngx_http_v3_srv_conf_t *conf = child;
174
175 ngx_conf_merge_size_value(conf->max_field_size,
176 prev->max_field_size,
177 NGX_HTTP_V3_DEFAULT_MAX_FIELD_SIZE);
178 166
179 ngx_conf_merge_size_value(conf->max_table_capacity, 167 ngx_conf_merge_size_value(conf->max_table_capacity,
180 prev->max_table_capacity, 168 prev->max_table_capacity,
181 NGX_HTTP_V3_DEFAULT_MAX_TABLE_CAPACITY); 169 NGX_HTTP_V3_DEFAULT_MAX_TABLE_CAPACITY);
182 170