summaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_rewrite_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-10-05 12:54:56 +0000
committerJonathan Kolb <jon@b0g.us>2005-10-05 12:54:56 +0000
commitf975df2451ff989ec252731b25a45ac02985372a (patch)
treec2cfe42f949ae4a0b2e8f5a927f3cde6db1d34e2 /src/http/modules/ngx_http_rewrite_module.c
parent3d5736770305c42dd10030969b18107abd2ae36a (diff)
downloadnginx-0.2.tar.gz
Changes with nginx 0.2.6 05 Oct 2005v0.2.6nginx-0.2
*) Change: while using load-balancing the time before the failed backend retry was decreased from 60 to 10 seconds. *) Change: the "proxy_pass_unparsed_uri" was canceled, the original URI now passed, if the URI part is omitted in "proxy_pass" directive. *) Feature: the "error_page" directive supports redirects and allows more flexible to change an error code. *) Change: the charset in the "Content-Type" header line now is ignored in proxied subrequests. *) Bugfix: if the URI was changed in the "if" block and request did not found new configuration, then the ngx_http_rewrite_module rules ran again. *) Bugfix: if the "set" directive set the ngx_http_geo_module variable in some configuration part, the this variable was not available in other configuration parts and the "using uninitialized variable" error was occurred; bug appeared in 0.2.2.
Diffstat (limited to 'src/http/modules/ngx_http_rewrite_module.c')
-rw-r--r--src/http/modules/ngx_http_rewrite_module.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c
index 693495e3b..c575d4343 100644
--- a/src/http/modules/ngx_http_rewrite_module.c
+++ b/src/http/modules/ngx_http_rewrite_module.c
@@ -691,7 +691,7 @@ ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if (pclcf->locations.elts == NULL) {
if (ngx_array_init(&pclcf->locations, cf->pool, 4, sizeof(void *))
- == NGX_ERROR)
+ == NGX_ERROR)
{
return NGX_CONF_ERROR;
}
@@ -759,6 +759,10 @@ ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if_code->next = (u_char *) lcf->codes->elts + lcf->codes->nelts
- (u_char *) if_code;
+ /* the code array belong to parent block */
+
+ nlcf->codes = NULL;
+
return NGX_CONF_OK;
}
@@ -1048,8 +1052,10 @@ ngx_http_rewrite_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_ERROR;
}
- v->handler = ngx_http_rewrite_var;
- v->data = index;
+ if (v->handler == NULL) {
+ v->handler = ngx_http_rewrite_var;
+ v->data = index;
+ }
n = ngx_http_script_variables_count(&value[2]);