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()
Igor Sysoev
11 years ago
3787 | 3787 | n = ngx_http_script_variables_count(&clcf->root); |
3788 | 3788 | |
3789 | 3789 | ngx_memzero(&sc, sizeof(ngx_http_script_compile_t)); |
3790 | sc.variables = n; | |
3791 | ||
3792 | #if (NGX_PCRE) | |
3793 | if (alias && clcf->regex) { | |
3794 | n = 1; | |
3795 | } | |
3796 | #endif | |
3790 | 3797 | |
3791 | 3798 | if (n) { |
3792 | 3799 | sc.cf = cf; |
3793 | 3800 | sc.source = &clcf->root; |
3794 | 3801 | sc.lengths = &clcf->root_lengths; |
3795 | 3802 | sc.values = &clcf->root_values; |
3796 | sc.variables = n; | |
3797 | 3803 | sc.complete_lengths = 1; |
3798 | 3804 | sc.complete_values = 1; |
3799 | 3805 |