mirror of
https://github.com/nginx/nginx.git
synced 2025-06-30 03:00:38 +08:00
Test regex location if URI matches exactly to non-exact location.
Revert a feature introduced in r2028. The feature confuses mostly, the only gain was not to test regex for a frequent request such as "/" in "locaiton /".
This commit is contained in:
parent
082d9965a3
commit
4115de9fe3
@ -1590,9 +1590,14 @@ ngx_http_core_find_static_location(ngx_http_request_t *r,
|
|||||||
|
|
||||||
if (len == (size_t) node->len) {
|
if (len == (size_t) node->len) {
|
||||||
|
|
||||||
r->loc_conf = (node->exact) ? node->exact->loc_conf:
|
if (node->exact) {
|
||||||
node->inclusive->loc_conf;
|
r->loc_conf = node->exact->loc_conf;
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
r->loc_conf = node->inclusive->loc_conf;
|
||||||
|
return NGX_AGAIN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* len < node->len */
|
/* len < node->len */
|
||||||
|
Loading…
Reference in New Issue
Block a user