Mercurial > hg > nginx-quic
comparison src/http/v3/ngx_http_v3_parse.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 | ab6aaa8e86b0 |
children | 12f18e0bca09 |
comparison
equal
deleted
inserted
replaced
8316:13f7085b90d2 | 8317:ae2e68f206f9 |
---|---|
486 | 486 |
487 static ngx_int_t | 487 static ngx_int_t |
488 ngx_http_v3_parse_literal(ngx_connection_t *c, ngx_http_v3_parse_literal_t *st, | 488 ngx_http_v3_parse_literal(ngx_connection_t *c, ngx_http_v3_parse_literal_t *st, |
489 u_char ch) | 489 u_char ch) |
490 { | 490 { |
491 ngx_uint_t n; | 491 ngx_uint_t n; |
492 ngx_http_v3_srv_conf_t *h3scf; | 492 ngx_http_core_srv_conf_t *cscf; |
493 enum { | 493 enum { |
494 sw_start = 0, | 494 sw_start = 0, |
495 sw_value | 495 sw_value |
496 }; | 496 }; |
497 | 497 |
503 "http3 parse literal huff:%ui, len:%ui", | 503 "http3 parse literal huff:%ui, len:%ui", |
504 st->huffman, st->length); | 504 st->huffman, st->length); |
505 | 505 |
506 n = st->length; | 506 n = st->length; |
507 | 507 |
508 h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module); | 508 cscf = ngx_http_v3_get_module_srv_conf(c, ngx_http_core_module); |
509 | 509 |
510 if (n > h3scf->max_field_size) { | 510 if (n > cscf->large_client_header_buffers.size) { |
511 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 511 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
512 "client exceeded http3_max_field_size limit"); | 512 "client sent too large header field"); |
513 return NGX_HTTP_V3_ERR_EXCESSIVE_LOAD; | 513 return NGX_HTTP_V3_ERR_EXCESSIVE_LOAD; |
514 } | 514 } |
515 | 515 |
516 if (st->huffman) { | 516 if (st->huffman) { |
517 n = n * 8 / 5; | 517 n = n * 8 / 5; |