aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-03-18 12:21:19 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-03-18 12:21:19 +0000
commitf76a6c2244dc20f7cfe01bb3261341436f0ac598 (patch)
tree456e45117c8b48cafe8b1ae2aad2d44150777ef5 /src
parentf2a8affd7ea513d4e730d63ce2a3e5d896be0633 (diff)
downloadnginx-f76a6c2244dc20f7cfe01bb3261341436f0ac598.tar.gz
nginx-f76a6c2244dc20f7cfe01bb3261341436f0ac598.zip
reserve space for r->uri, the bug has been introduced in r2566
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c4
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)
{