]> git.kaiwu.me - nginx.git/commitdiff
Test regex location if URI matches exactly to non-exact location.
authorIgor Sysoev <igor@sysoev.ru>
Fri, 18 Jun 2010 15:38:31 +0000 (15:38 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 18 Jun 2010 15:38:31 +0000 (15:38 +0000)
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 /".

src/http/ngx_http_core_module.c

index 637feabe9dda8fc9e38b40295f7f5badc180caa3..984d30617f53c26622cb1909d3da22bfa82816a3 100644 (file)
@@ -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 */