comparison 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
comparison
equal deleted inserted replaced
251:16ffa8ae5759 252:644510700914
588 ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) 588 ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
589 { 589 {
590 ngx_http_memcached_loc_conf_t *lcf = conf; 590 ngx_http_memcached_loc_conf_t *lcf = conf;
591 591
592 ngx_str_t *value; 592 ngx_str_t *value;
593 ngx_inet_upstream_t inet_upstream; 593 ngx_url_t u;
594 ngx_http_core_loc_conf_t *clcf; 594 ngx_http_core_loc_conf_t *clcf;
595 595
596 if (lcf->upstream.schema.len) { 596 if (lcf->upstream.schema.len) {
597 return "is duplicate"; 597 return "is duplicate";
598 } 598 }
599 599
600 value = cf->args->elts; 600 value = cf->args->elts;
601 601
602 ngx_memzero(&inet_upstream, sizeof(ngx_inet_upstream_t)); 602 ngx_memzero(&u, sizeof(ngx_url_t));
603 603
604 inet_upstream.name = value[1]; 604 u.url = value[1];
605 inet_upstream.url = value[1]; 605 u.uri_part = 1;
606 606
607 lcf->peers = ngx_inet_upstream_parse(cf, &inet_upstream); 607 if (ngx_parse_url(cf, &u) != NGX_OK) {
608 if (lcf->peers == NULL) { 608 if (u.err) {
609 return NGX_CONF_ERROR; 609 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
610 } 610 "%s in \"%V\"", u.err, &u.url);
611 611 }
612 }
613
614 lcf->peers = u.peers;
612 lcf->upstream.schema.len = sizeof("memcached://") - 1; 615 lcf->upstream.schema.len = sizeof("memcached://") - 1;
613 lcf->upstream.schema.data = (u_char *) "memcached://"; 616 lcf->upstream.schema.data = (u_char *) "memcached://";
614 617
615 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); 618 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
616 619