Mercurial > hg > nginx
comparison src/http/modules/ngx_http_memcached_module.c @ 1658:13f8dec720b5
proxy_pass variables support
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 27 Nov 2007 13:34:13 +0000 |
parents | 31d4278d51c0 |
children | a37fe5ceacc4 |
comparison
equal
deleted
inserted
replaced
1657:6a8a066adc98 | 1658:13f8dec720b5 |
---|---|
182 u = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_t)); | 182 u = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_t)); |
183 if (u == NULL) { | 183 if (u == NULL) { |
184 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 184 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
185 } | 185 } |
186 | 186 |
187 u->schema = mlcf->upstream.schema; | |
188 | |
187 u->peer.log = r->connection->log; | 189 u->peer.log = r->connection->log; |
188 u->peer.log_error = NGX_ERROR_ERR; | 190 u->peer.log_error = NGX_ERROR_ERR; |
189 #if (NGX_THREADS) | 191 #if (NGX_THREADS) |
190 u->peer.lock = &r->connection->lock; | 192 u->peer.lock = &r->connection->lock; |
191 #endif | 193 #endif |
614 | 616 |
615 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); | 617 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); |
616 | 618 |
617 clcf->handler = ngx_http_memcached_handler; | 619 clcf->handler = ngx_http_memcached_handler; |
618 | 620 |
619 lcf->upstream.location = clcf->name; | |
620 | |
621 if (clcf->name.data[clcf->name.len - 1] == '/') { | 621 if (clcf->name.data[clcf->name.len - 1] == '/') { |
622 clcf->auto_redirect = 1; | 622 clcf->auto_redirect = 1; |
623 } | 623 } |
624 | 624 |
625 lcf->index = ngx_http_get_variable_index(cf, &ngx_http_memcached_key); | 625 lcf->index = ngx_http_get_variable_index(cf, &ngx_http_memcached_key); |