Mercurial > hg > nginx
changeset 8789:3509b9dcfb47 quic
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.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 01 Jun 2021 11:41:38 +0300 |
parents | f0882db8c8d4 |
children | ac0398da8f23 |
files | src/http/v3/ngx_http_v3_parse.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/v3/ngx_http_v3_parse.c Mon May 31 11:54:47 2021 +0300 +++ b/src/http/v3/ngx_http_v3_parse.c Tue Jun 01 11:41:38 2021 +0300 @@ -1366,6 +1366,7 @@ st->literal.length = st->pint.value; if (st->literal.length == 0) { + st->value.len = 0; goto done; } @@ -1470,6 +1471,7 @@ st->literal.length = st->pint.value; if (st->literal.length == 0) { + st->value.len = 0; goto done; }