Mercurial > hg > nginx
changeset 3533:bb5376f3f585
do not add tested file to a location regex string,
instead, set URI to the tested file, or keep URI unchanged,
if the tested file is a directory,
the later allows to handle a directory autoredirect
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 27 May 2010 13:24:19 +0000 |
parents | a8966b3c1fcf |
children | 3711bb1336c3 |
files | src/http/ngx_http_core_module.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Thu May 27 13:15:24 2010 +0000 +++ b/src/http/ngx_http_core_module.c Thu May 27 13:24:19 2010 +0000 @@ -1282,6 +1282,12 @@ if (!alias) { r->uri = path; +#if (NGX_PCRE) + } else if (clcf->regex) { + if (!test_dir) { + r->uri = path; + } +#endif } else { r->uri.len = alias + path.len; r->uri.data = ngx_pnalloc(r->pool, r->uri.len);