Mercurial > hg > nginx-mail
diff src/http/modules/ngx_http_rewrite_module.c @ 495:ca8f7f6cab16 NGINX_0_7_40
nginx 0.7.40
*) Feature: the "location" directive supports captures in regular
expressions.
*) Feature: an "alias" directive with capture references may be used
inside a location given by a regular expression with captures.
*) Feature: the "server_name" directive supports captures in regular
expressions.
*) Workaround: the ngx_http_autoindex_module did not show the trailing
slash in directories on XFS filesystem; the issue had appeared in
0.7.15.
Thanks to Dmitry Kuzmenko.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 09 Mar 2009 00:00:00 +0300 |
parents | 984bb0b1399b |
children | f39b9e29530d |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -12,7 +12,6 @@ typedef struct { ngx_array_t *codes; /* uintptr_t */ - ngx_uint_t captures; ngx_uint_t stack_size; ngx_flag_t log; @@ -157,16 +156,6 @@ ngx_http_rewrite_handler(ngx_http_reques return NGX_HTTP_INTERNAL_SERVER_ERROR; } - if (rlcf->captures) { - e->captures = ngx_palloc(r->pool, rlcf->captures * sizeof(int)); - if (e->captures == NULL) { - return NGX_HTTP_INTERNAL_SERVER_ERROR; - } - - } else { - e->captures = NULL; - } - e->ip = rlcf->codes->elts; e->request = r; e->quote = 1; @@ -436,10 +425,6 @@ ngx_http_rewrite(ngx_conf_t *cf, ngx_com if (regex->ncaptures) { regex->ncaptures = (regex->ncaptures + 1) * 3; - - if (lcf->captures < regex->ncaptures) { - lcf->captures = regex->ncaptures; - } } regex_end = ngx_http_script_add_code(lcf->codes, @@ -618,11 +603,6 @@ ngx_http_rewrite_if(ngx_conf_t *cf, ngx_ } - if (lcf->captures < nlcf->captures) { - lcf->captures = nlcf->captures; - } - - if (elts != lcf->codes->elts) { if_code = (ngx_http_script_if_code_t *) ((u_char *) if_code + ((u_char *) lcf->codes->elts - elts)); @@ -777,10 +757,6 @@ ngx_http_rewrite_if_condition(ngx_conf_t if (n) { regex->ncaptures = (n + 1) * 3; - - if (lcf->captures < regex->ncaptures) { - lcf->captures = regex->ncaptures; - } } return NGX_CONF_OK;