summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-04-02 06:44:45 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-04-02 06:44:45 +0000
commita2b7cebbeaf9f85c93af56f11e593bd656a72cc2 (patch)
tree25924f734da91d0bde846957f0a0e5b8ca297554 /src/http/ngx_http.c
parentd10e29e06d61d70ca119a3d8c40f3d2f2f7420db (diff)
downloadnginx-a2b7cebbeaf9f85c93af56f11e593bd656a72cc2.tar.gz
nginx-a2b7cebbeaf9f85c93af56f11e593bd656a72cc2.tar.bz2
r2202, r2408, r2425, r2454, r2459, r2482, r2504, r2542, r2565, r2579,
r2580, r2585, r2586, r2587, r2591, r2626 merge: try_files
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r--src/http/ngx_http.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 5e3c4009d..f2b1c17d1 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -406,7 +406,7 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
use_rewrite = cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers.nelts ? 1 : 0;
use_access = cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers.nelts ? 1 : 0;
- n = use_rewrite + use_access + 1; /* find config phase */
+ n = use_rewrite + use_access + cmcf->try_files + 1 /* find config phase */;
for (i = 0; i < NGX_HTTP_LOG_PHASE; i++) {
n += cmcf->phases[i].handlers.nelts;
@@ -475,6 +475,15 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
continue;
+ case NGX_HTTP_TRY_FILES_PHASE:
+ if (cmcf->try_files) {
+ ph->checker = ngx_http_core_try_files_phase;
+ n++;
+ ph++;
+ }
+
+ continue;
+
case NGX_HTTP_CONTENT_PHASE:
checker = ngx_http_core_content_phase;
break;