aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-06-18 15:38:31 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-06-18 15:38:31 +0000
commit4115de9fe3bcc21c1595e5ffb6e9a1c72030bc66 (patch)
tree17921c6bdeac40f6705629f1090fe75ddcc3351c
parent082d9965a39f4f20f2781ce2e0ccd2c6edfac575 (diff)
downloadnginx-4115de9fe3bcc21c1595e5ffb6e9a1c72030bc66.tar.gz
nginx-4115de9fe3bcc21c1595e5ffb6e9a1c72030bc66.zip
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 /".
-rw-r--r--src/http/ngx_http_core_module.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 637feabe9..984d30617 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1590,9 +1590,14 @@ ngx_http_core_find_static_location(ngx_http_request_t *r,
if (len == (size_t) node->len) {
- r->loc_conf = (node->exact) ? node->exact->loc_conf:
- node->inclusive->loc_conf;
- return NGX_OK;
+ if (node->exact) {
+ r->loc_conf = node->exact->loc_conf;
+ return NGX_OK;
+
+ } else {
+ r->loc_conf = node->inclusive->loc_conf;
+ return NGX_AGAIN;
+ }
}
/* len < node->len */