From: Sergey Kandaurov Date: Wed, 24 Dec 2025 18:59:40 +0000 (+0400) Subject: Proxy: fixed sending HTTP/2 buffered request body on next upstream. X-Git-Tag: release-1.29.5~5 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=cd12dc4f1;p=nginx.git 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(). --- 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; }