mirror of
https://github.com/nginx/nginx.git
synced 2026-10-05 05:36:56 -05:00
Handle predicate location variable error
Previously, the error was ignored and the predicate was treated as false. Now the error leads to the request finalization.
This commit is contained in:
1 parent
5c812c034e
commit
005f9f5d4d
1 file changed
+4
-1
@@ -1514,8 +1514,11 @@ ngx_http_core_find_location(ngx_http_request_t *r)
|
||||
"test location: \"%V\"", &(*clcfp)->name);
|
||||
|
||||
vv = ngx_http_get_flushed_variable(r, (*clcfp)->predicate - 1);
|
||||
if (vv == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (vv && vv->len && (vv->len != 1 || vv->data[0] != '0')) {
|
||||
if (vv->len && (vv->len != 1 || vv->data[0] != '0')) {
|
||||
r->loc_conf = (*clcfp)->loc_conf;
|
||||
|
||||
/* look up nested locations */
|
||||
|
||||
Reference in new issue
Block a user