diff options
Diffstat (limited to 'src/http/ngx_http_upstream.c')
| -rw-r--r-- | src/http/ngx_http_upstream.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index b95db57a7..a04aad323 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -479,6 +479,8 @@ ngx_http_upstream_init_request(ngx_http_request_t *r) return; } + u->peer.local = u->conf->local; + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); u->output.alignment = clcf->directio_alignment; @@ -4196,6 +4198,31 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags) } +char * +ngx_http_upsteam_bind_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, + void *conf) +{ + char *p = conf; + + ngx_str_t *value; + ngx_addr_t **paddr; + + paddr = (ngx_addr_t **) (p + cmd->offset); + + value = cf->args->elts; + + *paddr = ngx_parse_addr(cf->pool, &value[1]); + if (*paddr) { + return NGX_CONF_OK; + } + + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid address \"%V\"", &value[1]); + + return NGX_CONF_ERROR; +} + + ngx_int_t ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf, ngx_http_upstream_conf_t *conf, ngx_http_upstream_conf_t *prev, |
