Mercurial > hg > nginx-mail
diff src/http/modules/ngx_http_memcached_module.c @ 252:644510700914 NGINX_0_4_11
nginx 0.4.11
*) Feature: the POP3 proxy supports the AUTH LOGIN PLAIN and CRAM-MD5.
*) Feature: the ngx_http_perl_module supports the $r->allow_ranges
method.
*) Bugfix: if the APOP was enabled in the POP3 proxy, then the
USER/PASS commands might not work; bug appeared in 0.4.10.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 25 Oct 2006 00:00:00 +0400 |
parents | 9909a161eb28 |
children | 0effe91f6083 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_memcached_module.c +++ b/src/http/modules/ngx_http_memcached_module.c @@ -590,7 +590,7 @@ ngx_http_memcached_pass(ngx_conf_t *cf, ngx_http_memcached_loc_conf_t *lcf = conf; ngx_str_t *value; - ngx_inet_upstream_t inet_upstream; + ngx_url_t u; ngx_http_core_loc_conf_t *clcf; if (lcf->upstream.schema.len) { @@ -599,16 +599,19 @@ ngx_http_memcached_pass(ngx_conf_t *cf, value = cf->args->elts; - ngx_memzero(&inet_upstream, sizeof(ngx_inet_upstream_t)); + ngx_memzero(&u, sizeof(ngx_url_t)); + + u.url = value[1]; + u.uri_part = 1; - inet_upstream.name = value[1]; - inet_upstream.url = value[1]; - - lcf->peers = ngx_inet_upstream_parse(cf, &inet_upstream); - if (lcf->peers == NULL) { - return NGX_CONF_ERROR; + if (ngx_parse_url(cf, &u) != NGX_OK) { + if (u.err) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "%s in \"%V\"", u.err, &u.url); + } } + lcf->peers = u.peers; lcf->upstream.schema.len = sizeof("memcached://") - 1; lcf->upstream.schema.data = (u_char *) "memcached://";