Mercurial > hg > nginx
changeset 1787:a37fe5ceacc4
inherit $memached_key index and memcached_pass upstream inside "if" block
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 27 Dec 2007 14:18:34 +0000 |
parents | adca43955f79 |
children | f10228d7ea06 |
files | src/http/modules/ngx_http_memcached_module.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_memcached_module.c Thu Dec 27 14:15:34 2007 +0000 +++ b/src/http/modules/ngx_http_memcached_module.c Thu Dec 27 14:18:34 2007 +0000 @@ -524,8 +524,6 @@ * conf->upstream.schema = { 0, NULL }; * conf->upstream.uri = { 0, NULL }; * conf->upstream.location = NULL; - * - * conf->index = 0; */ conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC; @@ -548,6 +546,8 @@ conf->upstream.pass_request_headers = 0; conf->upstream.pass_request_body = 0; + conf->index = NGX_CONF_UNSET; + return conf; } @@ -582,6 +582,15 @@ |NGX_HTTP_UPSTREAM_FT_OFF; } + if (conf->upstream.upstream == NULL) { + conf->upstream.upstream = prev->upstream.upstream; + conf->upstream.schema = prev->upstream.schema; + } + + if (conf->index == NGX_CONF_UNSET) { + conf->index = prev->index; + } + return NGX_CONF_OK; }