# HG changeset patch # User Sergey Kandaurov # Date 1622536898 -10800 # Node ID 3509b9dcfb47646a66b17e975c7538e11390b344 # Parent f0882db8c8d445e294b976ea44f3419f46bafb35 HTTP/3: fixed parsing encoder insertions with empty header value. When starting processing a new encoder instruction, the header state is not memzero'ed because generally it's burdensome. If the header value is empty, this resulted in inserting a stale value left from the previous instruction. Based on a patch by Zhiyong Sun. diff --git a/src/http/v3/ngx_http_v3_parse.c b/src/http/v3/ngx_http_v3_parse.c --- a/src/http/v3/ngx_http_v3_parse.c +++ b/src/http/v3/ngx_http_v3_parse.c @@ -1366,6 +1366,7 @@ ngx_http_v3_parse_header_inr(ngx_connect st->literal.length = st->pint.value; if (st->literal.length == 0) { + st->value.len = 0; goto done; } @@ -1470,6 +1471,7 @@ ngx_http_v3_parse_header_iwnr(ngx_connec st->literal.length = st->pint.value; if (st->literal.length == 0) { + st->value.len = 0; goto done; }