comparison src/http/ngx_http_upstream.c @ 3271:fcd98af88df3

proxy_bind, fastcgi_bind, and memcached_bind
author Igor Sysoev <igor@sysoev.ru>
date Mon, 02 Nov 2009 15:24:02 +0000
parents 48bfb7dc981b
children 98f49b2bcae8
comparison
equal deleted inserted replaced
3270:7d1a04259e3f 3271:fcd98af88df3
477 if (u->create_request(r) != NGX_OK) { 477 if (u->create_request(r) != NGX_OK) {
478 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 478 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
479 return; 479 return;
480 } 480 }
481 481
482 u->peer.local = u->conf->local;
483
482 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 484 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
483 485
484 u->output.alignment = clcf->directio_alignment; 486 u->output.alignment = clcf->directio_alignment;
485 u->output.pool = r->pool; 487 u->output.pool = r->pool;
486 u->output.bufs.num = 1; 488 u->output.bufs.num = 1;
4194 4196
4195 return uscf; 4197 return uscf;
4196 } 4198 }
4197 4199
4198 4200
4201 char *
4202 ngx_http_upsteam_bind_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
4203 void *conf)
4204 {
4205 char *p = conf;
4206
4207 ngx_str_t *value;
4208 ngx_addr_t **paddr;
4209
4210 paddr = (ngx_addr_t **) (p + cmd->offset);
4211
4212 value = cf->args->elts;
4213
4214 *paddr = ngx_parse_addr(cf->pool, &value[1]);
4215 if (*paddr) {
4216 return NGX_CONF_OK;
4217 }
4218
4219 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
4220 "invalid address \"%V\"", &value[1]);
4221
4222 return NGX_CONF_ERROR;
4223 }
4224
4225
4199 ngx_int_t 4226 ngx_int_t
4200 ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf, 4227 ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf,
4201 ngx_http_upstream_conf_t *conf, ngx_http_upstream_conf_t *prev, 4228 ngx_http_upstream_conf_t *conf, ngx_http_upstream_conf_t *prev,
4202 ngx_str_t *default_hide_headers, ngx_hash_init_t *hash) 4229 ngx_str_t *default_hide_headers, ngx_hash_init_t *hash)
4203 { 4230 {