Skip to content

Commit 34bd899

Browse files
committed
HTTP/3: fixed handling of zero-length literal field line.
Previously, st->value was passed with NULL data pointer to header handlers.
1 parent 9ddc6a0 commit 34bd899

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/http/v3/ngx_http_v3_parse.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ ngx_http_v3_parse_field_lri(ngx_connection_t *c,
810810

811811
st->literal.length = st->pint.value;
812812
if (st->literal.length == 0) {
813+
st->value.data = (u_char *) "";
813814
goto done;
814815
}
815816

@@ -932,6 +933,7 @@ ngx_http_v3_parse_field_l(ngx_connection_t *c,
932933

933934
st->literal.length = st->pint.value;
934935
if (st->literal.length == 0) {
936+
st->value.data = (u_char *) "";
935937
goto done;
936938
}
937939

@@ -1072,6 +1074,7 @@ ngx_http_v3_parse_field_lpbi(ngx_connection_t *c,
10721074

10731075
st->literal.length = st->pint.value;
10741076
if (st->literal.length == 0) {
1077+
st->value.data = (u_char *) "";
10751078
goto done;
10761079
}
10771080

0 commit comments

Comments
 (0)