Mercurial > hg > nginx-ranges
comparison src/http/ngx_http_script.c @ 560: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 | 8246d8a2c2be |
comparison
equal
deleted
inserted
replaced
559:43154840419e | 560:ab7d265273ed |
---|---|
908 | 908 |
909 if (code->lengths == NULL) { | 909 if (code->lengths == NULL) { |
910 e->buf.len = code->size; | 910 e->buf.len = code->size; |
911 | 911 |
912 if (code->uri) { | 912 if (code->uri) { |
913 if (rc && (r->quoted_uri || r->plus_in_uri)) { | 913 if (r->ncaptures && (r->quoted_uri || r->plus_in_uri)) { |
914 e->buf.len += 2 * ngx_escape_uri(NULL, r->uri.data, r->uri.len, | 914 e->buf.len += 2 * ngx_escape_uri(NULL, r->uri.data, r->uri.len, |
915 NGX_ESCAPE_ARGS); | 915 NGX_ESCAPE_ARGS); |
916 } | 916 } |
917 } | 917 } |
918 | 918 |
919 for (n = 1; n < (ngx_uint_t) rc; n++) { | 919 for (n = 2; n < r->ncaptures; n += 2) { |
920 e->buf.len += r->captures[2 * n + 1] - r->captures[2 * n]; | 920 e->buf.len += r->captures[n + 1] - r->captures[n]; |
921 } | 921 } |
922 | 922 |
923 } else { | 923 } else { |
924 ngx_memzero(&le, sizeof(ngx_http_script_engine_t)); | 924 ngx_memzero(&le, sizeof(ngx_http_script_engine_t)); |
925 | 925 |