comparison 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
comparison
equal deleted inserted replaced
5007:13c4c155f26f 5008:fd84344f1df7
572 * conf->upstream.temp_path = NULL; 572 * conf->upstream.temp_path = NULL;
573 * conf->upstream.uri = { 0, NULL }; 573 * conf->upstream.uri = { 0, NULL };
574 * conf->upstream.location = NULL; 574 * conf->upstream.location = NULL;
575 */ 575 */
576 576
577 conf->upstream.local = NGX_CONF_UNSET_PTR;
577 conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC; 578 conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC;
578 conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC; 579 conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC;
579 conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC; 580 conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC;
580 581
581 conf->upstream.buffer_size = NGX_CONF_UNSET_SIZE; 582 conf->upstream.buffer_size = NGX_CONF_UNSET_SIZE;
605 ngx_http_memcached_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) 606 ngx_http_memcached_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
606 { 607 {
607 ngx_http_memcached_loc_conf_t *prev = parent; 608 ngx_http_memcached_loc_conf_t *prev = parent;
608 ngx_http_memcached_loc_conf_t *conf = child; 609 ngx_http_memcached_loc_conf_t *conf = child;
609 610
611 ngx_conf_merge_ptr_value(conf->upstream.local,
612 prev->upstream.local, NULL);
613
610 ngx_conf_merge_msec_value(conf->upstream.connect_timeout, 614 ngx_conf_merge_msec_value(conf->upstream.connect_timeout,
611 prev->upstream.connect_timeout, 60000); 615 prev->upstream.connect_timeout, 60000);
612 616
613 ngx_conf_merge_msec_value(conf->upstream.send_timeout, 617 ngx_conf_merge_msec_value(conf->upstream.send_timeout,
614 prev->upstream.send_timeout, 60000); 618 prev->upstream.send_timeout, 60000);