comparison src/http/modules/ngx_http_memcached_module.c @ 572:ff463db0be31 NGINX_0_8_38

nginx 0.8.38 *) Feature: the "proxy_no_cache" and "fastcgi_no_cache" directives. *) Feature: now the "rewrite" directive does a redirect automatically if the $scheme variable is used. Thanks to Piotr Sikora. *) Bugfix: now "limit_req" delay directive conforms to the described algorithm. Thanks to Maxim Dounin. *) Bugfix: the $uid_got variable might not be used in the SSI and perl modules.
author Igor Sysoev <http://sysoev.ru>
date Mon, 24 May 2010 00:00:00 +0400
parents 8246d8a2c2be
children eb208e0cf44d
comparison
equal deleted inserted replaced
571:5b59e716792b 572:ff463db0be31
36 void *parent, void *child); 36 void *parent, void *child);
37 37
38 static char *ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, 38 static char *ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd,
39 void *conf); 39 void *conf);
40 40
41 static char *ngx_http_memcached_upstream_max_fails_unsupported(ngx_conf_t *cf,
42 ngx_command_t *cmd, void *conf);
43 static char *ngx_http_memcached_upstream_fail_timeout_unsupported(ngx_conf_t *cf,
44 ngx_command_t *cmd, void *conf);
45
46 41
47 static ngx_conf_bitmask_t ngx_http_memcached_next_upstream_masks[] = { 42 static ngx_conf_bitmask_t ngx_http_memcached_next_upstream_masks[] = {
48 { ngx_string("error"), NGX_HTTP_UPSTREAM_FT_ERROR }, 43 { ngx_string("error"), NGX_HTTP_UPSTREAM_FT_ERROR },
49 { ngx_string("timeout"), NGX_HTTP_UPSTREAM_FT_TIMEOUT }, 44 { ngx_string("timeout"), NGX_HTTP_UPSTREAM_FT_TIMEOUT },
50 { ngx_string("invalid_response"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER }, 45 { ngx_string("invalid_response"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER },
102 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, 97 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
103 ngx_conf_set_bitmask_slot, 98 ngx_conf_set_bitmask_slot,
104 NGX_HTTP_LOC_CONF_OFFSET, 99 NGX_HTTP_LOC_CONF_OFFSET,
105 offsetof(ngx_http_memcached_loc_conf_t, upstream.next_upstream), 100 offsetof(ngx_http_memcached_loc_conf_t, upstream.next_upstream),
106 &ngx_http_memcached_next_upstream_masks }, 101 &ngx_http_memcached_next_upstream_masks },
107
108 { ngx_string("memcached_upstream_max_fails"),
109 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
110 ngx_http_memcached_upstream_max_fails_unsupported,
111 0,
112 0,
113 NULL },
114
115 { ngx_string("memcached_upstream_fail_timeout"),
116 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
117 ngx_http_memcached_upstream_fail_timeout_unsupported,
118 0,
119 0,
120 NULL },
121 102
122 ngx_null_command 103 ngx_null_command
123 }; 104 };
124 105
125 106
638 return NGX_CONF_ERROR; 619 return NGX_CONF_ERROR;
639 } 620 }
640 621
641 return NGX_CONF_OK; 622 return NGX_CONF_OK;
642 } 623 }
643
644
645 static char *
646 ngx_http_memcached_upstream_max_fails_unsupported(ngx_conf_t *cf,
647 ngx_command_t *cmd, void *conf)
648 {
649 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
650 "\"memcached_upstream_max_fails\" is not supported, "
651 "use the \"max_fails\" parameter of the \"server\" directive ",
652 "inside the \"upstream\" block");
653
654 return NGX_CONF_ERROR;
655 }
656
657
658 static char *
659 ngx_http_memcached_upstream_fail_timeout_unsupported(ngx_conf_t *cf,
660 ngx_command_t *cmd, void *conf)
661 {
662 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
663 "\"memcached_upstream_fail_timeout\" is not supported, "
664 "use the \"fail_timeout\" parameter of the \"server\" directive ",
665 "inside the \"upstream\" block");
666
667 return NGX_CONF_ERROR;
668 }