From: Maxim Dounin Date: Sat, 18 Jul 2026 16:45:55 +0000 (+0300) Subject: Index: fixed handling of non-cacheable variables. X-Git-Url: https://git.kaiwu.me/ngx_http_auth_basic_module.html?a=commitdiff_plain;h=62f94cf696cddc8c3e68a957cc52191a316621b1;p=nginx.git Index: fixed handling of non-cacheable variables. Previously, "e.flushed = 1;" was incorrectly used during initial length calculations, and as a result non-cacheable variables were not flushed. The fix is to only set "e.flushed" when evaluating values. A similar issue in try_files was fixed in 2424:46d11bff21ef (0.7.29). Origin: Signed-off-by: Roman Arutyunyan --- diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c index 149b44725..9cb16ebc0 100644 --- a/src/http/modules/ngx_http_index_module.c +++ b/src/http/modules/ngx_http_index_module.c @@ -145,7 +145,6 @@ ngx_http_index_handler(ngx_http_request_t *r) e.ip = index[i].lengths->elts; e.request = r; - e.flushed = 1; /* 1 is for terminating '\0' as in static names */ len = 1; @@ -182,6 +181,7 @@ ngx_http_index_handler(ngx_http_request_t *r) e.ip = index[i].values->elts; e.pos = name; e.end = name + allocated; + e.flushed = 1; while (*(uintptr_t *) e.ip) { code = *(ngx_http_script_code_pt *) e.ip;