mirror of
https://github.com/nginx/nginx.git
synced 2026-10-21 03:21:08 +00:00
Handle predicate location variable error
Some checks are pending
buildbot / buildbot (push) Waiting to run
Some checks are pending
buildbot / buildbot (push) Waiting to run
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:
parent
5c812c034e
commit
005f9f5d4d
1 changed files with 4 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue