Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_variables.c @ 548:ab7d265273ed NGINX_0_8_26
nginx 0.8.26
*) Bugfix: in captures usage in "rewrite" directive; the bug had
appeared in 0.8.25.
*) Bugfix: nginx could not be built without the --with-debug option;
the bug had appeared in 0.8.25.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 16 Nov 2009 00:00:00 +0300 |
parents | e19e5f542878 |
children | 43e02819c5cf |
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -1759,7 +1759,7 @@ ngx_http_regex_exec(ngx_http_request_t * cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); if (re->ncaptures) { - len = (cmcf->ncaptures + 1) * 3; + len = cmcf->ncaptures; if (r->captures == NULL) { r->captures = ngx_palloc(r->pool, len * sizeof(int)); @@ -1810,7 +1810,7 @@ ngx_http_regex_exec(ngx_http_request_t * #endif } - r->ncaptures = len; + r->ncaptures = rc * 2; r->captures_data = s->data; return NGX_OK;