Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2_module.c @ 7774:827202ca1269
HTTP/2: removed http2_max_field_size and http2_max_header_size.
Instead, size of one large_client_header_buffers buffer and all large
client header buffers are used.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 11 Feb 2021 21:52:26 +0300 |
parents | f790816a0e87 |
children | 08ef02ad5c54 |
comparison
equal
deleted
inserted
replaced
7773:b64f553b1291 | 7774:827202ca1269 |
---|---|
48 ngx_conf_deprecated, "http2_idle_timeout", "keepalive_timeout" | 48 ngx_conf_deprecated, "http2_idle_timeout", "keepalive_timeout" |
49 }; | 49 }; |
50 | 50 |
51 static ngx_conf_deprecated_t ngx_http_v2_max_requests_deprecated = { | 51 static ngx_conf_deprecated_t ngx_http_v2_max_requests_deprecated = { |
52 ngx_conf_deprecated, "http2_max_requests", "keepalive_requests" | 52 ngx_conf_deprecated, "http2_max_requests", "keepalive_requests" |
53 }; | |
54 | |
55 static ngx_conf_deprecated_t ngx_http_v2_max_field_size_deprecated = { | |
56 ngx_conf_deprecated, "http2_max_field_size", "large_client_header_buffers" | |
57 }; | |
58 | |
59 static ngx_conf_deprecated_t ngx_http_v2_max_header_size_deprecated = { | |
60 ngx_conf_deprecated, "http2_max_header_size", "large_client_header_buffers" | |
53 }; | 61 }; |
54 | 62 |
55 | 63 |
56 static ngx_conf_post_t ngx_http_v2_recv_buffer_size_post = | 64 static ngx_conf_post_t ngx_http_v2_recv_buffer_size_post = |
57 { ngx_http_v2_recv_buffer_size }; | 65 { ngx_http_v2_recv_buffer_size }; |
102 0, | 110 0, |
103 &ngx_http_v2_max_requests_deprecated }, | 111 &ngx_http_v2_max_requests_deprecated }, |
104 | 112 |
105 { ngx_string("http2_max_field_size"), | 113 { ngx_string("http2_max_field_size"), |
106 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, | 114 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
107 ngx_conf_set_size_slot, | 115 ngx_http_v2_obsolete, |
108 NGX_HTTP_SRV_CONF_OFFSET, | 116 0, |
109 offsetof(ngx_http_v2_srv_conf_t, max_field_size), | 117 0, |
110 NULL }, | 118 &ngx_http_v2_max_field_size_deprecated }, |
111 | 119 |
112 { ngx_string("http2_max_header_size"), | 120 { ngx_string("http2_max_header_size"), |
113 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, | 121 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
114 ngx_conf_set_size_slot, | 122 ngx_http_v2_obsolete, |
115 NGX_HTTP_SRV_CONF_OFFSET, | 123 0, |
116 offsetof(ngx_http_v2_srv_conf_t, max_header_size), | 124 0, |
117 NULL }, | 125 &ngx_http_v2_max_header_size_deprecated }, |
118 | 126 |
119 { ngx_string("http2_body_preread_size"), | 127 { ngx_string("http2_body_preread_size"), |
120 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, | 128 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, |
121 ngx_conf_set_size_slot, | 129 ngx_conf_set_size_slot, |
122 NGX_HTTP_SRV_CONF_OFFSET, | 130 NGX_HTTP_SRV_CONF_OFFSET, |
309 h2scf->pool_size = NGX_CONF_UNSET_SIZE; | 317 h2scf->pool_size = NGX_CONF_UNSET_SIZE; |
310 | 318 |
311 h2scf->concurrent_streams = NGX_CONF_UNSET_UINT; | 319 h2scf->concurrent_streams = NGX_CONF_UNSET_UINT; |
312 h2scf->concurrent_pushes = NGX_CONF_UNSET_UINT; | 320 h2scf->concurrent_pushes = NGX_CONF_UNSET_UINT; |
313 | 321 |
314 h2scf->max_field_size = NGX_CONF_UNSET_SIZE; | |
315 h2scf->max_header_size = NGX_CONF_UNSET_SIZE; | |
316 | |
317 h2scf->preread_size = NGX_CONF_UNSET_SIZE; | 322 h2scf->preread_size = NGX_CONF_UNSET_SIZE; |
318 | 323 |
319 h2scf->streams_index_mask = NGX_CONF_UNSET_UINT; | 324 h2scf->streams_index_mask = NGX_CONF_UNSET_UINT; |
320 | 325 |
321 return h2scf; | 326 return h2scf; |
332 | 337 |
333 ngx_conf_merge_uint_value(conf->concurrent_streams, | 338 ngx_conf_merge_uint_value(conf->concurrent_streams, |
334 prev->concurrent_streams, 128); | 339 prev->concurrent_streams, 128); |
335 ngx_conf_merge_uint_value(conf->concurrent_pushes, | 340 ngx_conf_merge_uint_value(conf->concurrent_pushes, |
336 prev->concurrent_pushes, 10); | 341 prev->concurrent_pushes, 10); |
337 | |
338 ngx_conf_merge_size_value(conf->max_field_size, prev->max_field_size, | |
339 4096); | |
340 ngx_conf_merge_size_value(conf->max_header_size, prev->max_header_size, | |
341 16384); | |
342 | 342 |
343 ngx_conf_merge_size_value(conf->preread_size, prev->preread_size, 65536); | 343 ngx_conf_merge_size_value(conf->preread_size, prev->preread_size, 65536); |
344 | 344 |
345 ngx_conf_merge_uint_value(conf->streams_index_mask, | 345 ngx_conf_merge_uint_value(conf->streams_index_mask, |
346 prev->streams_index_mask, 32 - 1); | 346 prev->streams_index_mask, 32 - 1); |