comparison 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
comparison
equal deleted inserted replaced
547:43154840419e 548:ab7d265273ed
1757 ngx_http_core_main_conf_t *cmcf; 1757 ngx_http_core_main_conf_t *cmcf;
1758 1758
1759 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); 1759 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
1760 1760
1761 if (re->ncaptures) { 1761 if (re->ncaptures) {
1762 len = (cmcf->ncaptures + 1) * 3; 1762 len = cmcf->ncaptures;
1763 1763
1764 if (r->captures == NULL) { 1764 if (r->captures == NULL) {
1765 r->captures = ngx_palloc(r->pool, len * sizeof(int)); 1765 r->captures = ngx_palloc(r->pool, len * sizeof(int));
1766 if (r->captures == NULL) { 1766 if (r->captures == NULL) {
1767 return NGX_ERROR; 1767 return NGX_ERROR;
1808 &v[index].name, vv->len, vv->data); 1808 &v[index].name, vv->len, vv->data);
1809 } 1809 }
1810 #endif 1810 #endif
1811 } 1811 }
1812 1812
1813 r->ncaptures = len; 1813 r->ncaptures = rc * 2;
1814 r->captures_data = s->data; 1814 r->captures_data = s->data;
1815 1815
1816 return NGX_OK; 1816 return NGX_OK;
1817 } 1817 }
1818 1818