aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_fastcgi_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 957927741..6e4d956d8 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -512,8 +512,16 @@ ngx_http_fastcgi_eval(ngx_http_request_t *r, ngx_http_fastcgi_loc_conf_t *flcf)
return NGX_ERROR;
}
- r->upstream->resolved->host = u.host;
- r->upstream->resolved->port = u.port;
+ if (u.addrs[0].sockaddr) {
+ r->upstream->resolved->sockaddr = u.addrs[0].sockaddr;
+ r->upstream->resolved->socklen = u.addrs[0].socklen;
+ r->upstream->resolved->naddrs = 1;
+ r->upstream->resolved->host = u.addrs[0].name;
+
+ } else {
+ r->upstream->resolved->host = u.host;
+ r->upstream->resolved->port = u.port;
+ }
return NGX_OK;
}