Mercurial > hg > nginx
changeset 3749:3ee39f593642
if a location is specified by regex, then always compile an "alias",
even into one static string script: this elimates testing this
too specific case inside ngx_http_map_uri_to_path()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 26 Aug 2010 12:33:08 +0000 |
parents | 85224d3b3f93 |
children | ffbdaa3c70d6 |
files | src/http/ngx_http_core_module.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Wed Aug 25 12:30:08 2010 +0000 +++ b/src/http/ngx_http_core_module.c Thu Aug 26 12:33:08 2010 +0000 @@ -3788,13 +3788,19 @@ n = ngx_http_script_variables_count(&clcf->root); ngx_memzero(&sc, sizeof(ngx_http_script_compile_t)); + sc.variables = n; + +#if (NGX_PCRE) + if (alias && clcf->regex) { + n = 1; + } +#endif if (n) { sc.cf = cf; sc.source = &clcf->root; sc.lengths = &clcf->root_lengths; sc.values = &clcf->root_values; - sc.variables = n; sc.complete_lengths = 1; sc.complete_values = 1;