diff options
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 66698d525..66b3cee16 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1688,7 +1688,9 @@ ngx_http_map_uri_to_path(ngx_http_request_t *r, ngx_str_t *path, last = ngx_copy(path->data, clcf->root.data, clcf->root.len); } else { - if (ngx_http_script_run(r, path, clcf->root_lengths->elts, ++reserved, + reserved += alias ? 1 : r->uri.len + 1; + + if (ngx_http_script_run(r, path, clcf->root_lengths->elts, reserved, clcf->root_values->elts) == NULL) { |