]> git.kaiwu.me - nginx.git/commitdiff
Proxy: reset pending control frames on HTTP/2 upstream reinit.
authorDavid Carlier <devnexen@gmail.com>
Thu, 19 Feb 2026 07:26:42 +0000 (07:26 +0000)
committerSergey Kandaurov <s.kandaurov@f5.com>
Mon, 16 Mar 2026 07:37:33 +0000 (11:37 +0400)
Previously, ctx->out was not cleared in ngx_http_proxy_v2_reinit_request(),
which could cause stale HTTP/2 control frames (SETTINGS ACK, PING ACK,
WINDOW_UPDATE) queued for the old upstream connection to be sent to a new
upstream connection during a retry.

src/http/modules/ngx_http_proxy_v2_module.c

index 2c8a3d4d1c2efb64fccb15f362c12a3251135ff3..4c282a8640448d9045643dfbb64ba300e01db4d5 100644 (file)
@@ -946,6 +946,7 @@ ngx_http_proxy_v2_reinit_request(ngx_http_request_t *r)
     ctx->connection = NULL;
     ctx->in = NULL;
     ctx->busy = NULL;
+    ctx->out = NULL;
 
     return NGX_OK;
 }