changeset 8451:908cae4f3078 quic

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.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 25 Jun 2020 20:31:13 +0300
parents a62849b6463c
children a6675a976560
files src/http/v3/ngx_http_v3_request.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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_reque
     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);