From: Roman Arutyunyan Date: Wed, 9 Sep 2026 14:23:22 +0000 (+0400) Subject: Handle nested location lookup error X-Git-Tag: release-1.31.6~5 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=df5269cc425f4cb1288fb8ca9f7e22166103feee;p=nginx.git 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. --- 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; }