From cd12dc4f12489257e851654ec1883cf06fa0b095 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Wed, 24 Dec 2025 22:59:40 +0400 Subject: [PATCH] Proxy: fixed sending HTTP/2 buffered request body on next upstream. If a buffered request body wasn't fully sent, such as on early upstream response or limited by flow control, unsent buffers could remain in the input or busy chains when switching to the next upstream server. This resulted either in the invalid request sent or a stalled connection. The fix is to reset chains similar to ngx_http_upstream_reinit(). --- src/http/modules/ngx_http_proxy_v2_module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/http/modules/ngx_http_proxy_v2_module.c b/src/http/modules/ngx_http_proxy_v2_module.c index 17983a29d..f109fe94e 100644 --- a/src/http/modules/ngx_http_proxy_v2_module.c +++ b/src/http/modules/ngx_http_proxy_v2_module.c @@ -944,6 +944,8 @@ ngx_http_proxy_v2_reinit_request(ngx_http_request_t *r) ctx->rst = 0; ctx->goaway = 0; ctx->connection = NULL; + ctx->in = NULL; + ctx->busy = NULL; return NGX_OK; }