diff src/http/modules/ngx_http_memcached_module.c @ 5008:fd84344f1df7

Fixed and improved the "*_bind" directives of proxying modules. The "proxy_bind", "fastcgi_bind", "uwsgi_bind", "scgi_bind" and "memcached_bind" directives are now inherited; inherited value can be reset by the "off" parameter. Duplicate directives are now detected. Parameter value can now contain variables.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 16 Jan 2013 09:42:57 +0000
parents a4512d7737f6
children a30ea5c6451d
line wrap: on
line diff
--- a/src/http/modules/ngx_http_memcached_module.c
+++ b/src/http/modules/ngx_http_memcached_module.c
@@ -574,6 +574,7 @@ ngx_http_memcached_create_loc_conf(ngx_c
      *     conf->upstream.location = NULL;
      */
 
+    conf->upstream.local = NGX_CONF_UNSET_PTR;
     conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC;
     conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC;
     conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC;
@@ -607,6 +608,9 @@ ngx_http_memcached_merge_loc_conf(ngx_co
     ngx_http_memcached_loc_conf_t *prev = parent;
     ngx_http_memcached_loc_conf_t *conf = child;
 
+    ngx_conf_merge_ptr_value(conf->upstream.local,
+                              prev->upstream.local, NULL);
+
     ngx_conf_merge_msec_value(conf->upstream.connect_timeout,
                               prev->upstream.connect_timeout, 60000);