From: Sergey Kandaurov Date: Thu, 25 Jun 2020 17:31:13 +0000 (+0300) Subject: HTTP/3: do not emit a DATA frame header for header_only responses. X-Git-Tag: release-1.25.0~4^2~658 X-Git-Url: http://git.kaiwu.me/%7B@url%7D?a=commitdiff_plain;h=3168f58306820428fec2c2871fd03a325aa0c65c;p=nginx.git HTTP/3: do not emit a DATA frame header for header_only responses. This resulted in the frame error due to the invalid DATA frame length. --- diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c index 7fb297728..d9ea99d2c 100644 --- a/src/http/v3/ngx_http_v3_request.c +++ b/src/http/v3/ngx_http_v3_request.c @@ -666,7 +666,7 @@ ngx_http_v3_create_header(ngx_http_request_t *r) hl->buf = b; hl->next = cl; - if (r->headers_out.content_length_n >= 0) { + if (r->headers_out.content_length_n >= 0 && !r->header_only) { len = 1 + ngx_http_v3_encode_varlen_int(NULL, r->headers_out.content_length_n);