From: David Carlier Date: Fri, 20 Feb 2026 05:08:09 +0000 (+0000) Subject: gRPC: reset buffer chains on upstream reinit. X-Git-Tag: release-1.29.7~13 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=a29476464cc86092135401bdcad91e4d38ac6b6d;p=nginx.git gRPC: reset buffer chains on upstream reinit. Previously, ctx->out was not cleared in ngx_http_grpc_reinit_request(), which could cause queued HTTP/2 control frames (SETTINGS ACK, PING ACK, WINDOW_UPDATE) to be sent on next upstream. Additionally, ctx->in and ctx->busy needs to be cleared to avoid similar problems with buffered request body fixed in cd12dc4f1. --- diff --git a/src/http/modules/ngx_http_grpc_module.c b/src/http/modules/ngx_http_grpc_module.c index 4c95525b4..cc3aebe59 100644 --- a/src/http/modules/ngx_http_grpc_module.c +++ b/src/http/modules/ngx_http_grpc_module.c @@ -1224,6 +1224,9 @@ ngx_http_grpc_reinit_request(ngx_http_request_t *r) ctx->rst = 0; ctx->goaway = 0; ctx->connection = NULL; + ctx->in = NULL; + ctx->busy = NULL; + ctx->out = NULL; return NGX_OK; }