# HG changeset patch # User Roman Arutyunyan # Date 1593520329 -10800 # Node ID b3c07aa021f6300b66dc37d8483888010d5e109d # Parent 72f9ff4e0a88a779f25045df5f96d2569e27ffa6 HTTP/3: set r->headers_in.chunked flag after parsing headers. Previously it was set when creating the request object. The side-effect was trying to discard the request body in case of header parse error. diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -727,7 +727,6 @@ ngx_http_alloc_request(ngx_connection_t #if (NGX_HTTP_V3) if (hc->quic) { r->http_version = NGX_HTTP_VERSION_30; - r->headers_in.chunked = 1; } #endif @@ -2155,6 +2154,12 @@ ngx_http_process_request_header(ngx_http } } +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30) { + r->headers_in.chunked = 1; + } +#endif + if (r->headers_in.connection_type == NGX_HTTP_CONNECTION_KEEP_ALIVE) { if (r->headers_in.keep_alive) { r->headers_in.keep_alive_n =