From df5269cc425f4cb1288fb8ca9f7e22166103feee Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Wed, 9 Sep 2026 18:23:22 +0400 Subject: [PATCH] Handle nested location lookup error Previously, when looking up a nested location after a prefix location match, the nested regex or predicate match error could be ignored if more regex or predicate locations were configured at the current level. Now such error leads to request finalization. --- src/http/ngx_http_core_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 1bd8a55ab..504e49eb2 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1470,7 +1470,7 @@ ngx_http_core_find_location(ngx_http_request_t *r) rc = ngx_http_core_find_location(r); } - if (rc == NGX_OK || rc == NGX_DONE) { + if (rc == NGX_OK || rc == NGX_DONE || rc == NGX_ERROR) { return rc; }