From 9c7527918e5acda9c89d14cd8b5a5c93563cc63a Mon Sep 17 00:00:00 2001 From: Valery Chistyakov Date: Sat, 28 Sep 2024 11:08:32 +0300 Subject: [PATCH] Proxy: always initialize header's chain next field --- src/http/modules/ngx_http_proxy_module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index f9a373744..e1cc818d1 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -1949,6 +1949,8 @@ ngx_http_proxy_process_header(ngx_http_request_t *r) if (rc != NGX_OK) { return rc; } + } else { + h->next = NULL; } ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,