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.
This commit is contained in:
Sergey Kandaurov 2020-06-25 20:31:13 +03:00
parent 9022fc686d
commit 3168f58306

View File

@ -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);