aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c6
-rw-r--r--src/http/modules/ngx_http_proxy_module.c6
-rw-r--r--src/http/modules/ngx_http_scgi_module.c6
-rw-r--r--src/http/modules/ngx_http_uwsgi_module.c6
4 files changed, 8 insertions, 16 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index f1ff2efdd..4e2dff87a 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -769,13 +769,11 @@ ngx_http_fastcgi_eval(ngx_http_request_t *r, ngx_http_fastcgi_loc_conf_t *flcf)
if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
+ u->resolved->name = url.addrs[0].name;
u->resolved->naddrs = 1;
- u->resolved->host = url.addrs[0].name;
-
- } else {
- u->resolved->host = url.host;
}
+ u->resolved->host = url.host;
u->resolved->port = url.port;
u->resolved->no_port = url.no_port;
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 01625fd50..15cdcc5cf 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -1011,13 +1011,11 @@ ngx_http_proxy_eval(ngx_http_request_t *r, ngx_http_proxy_ctx_t *ctx,
if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
+ u->resolved->name = url.addrs[0].name;
u->resolved->naddrs = 1;
- u->resolved->host = url.addrs[0].name;
-
- } else {
- u->resolved->host = url.host;
}
+ u->resolved->host = url.host;
u->resolved->port = (in_port_t) (url.no_port ? port : url.port);
u->resolved->no_port = url.no_port;
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index ee9036c3e..5a18f557e 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -565,13 +565,11 @@ ngx_http_scgi_eval(ngx_http_request_t *r, ngx_http_scgi_loc_conf_t * scf)
if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
+ u->resolved->name = url.addrs[0].name;
u->resolved->naddrs = 1;
- u->resolved->host = url.addrs[0].name;
-
- } else {
- u->resolved->host = url.host;
}
+ u->resolved->host = url.host;
u->resolved->port = url.port;
u->resolved->no_port = url.no_port;
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c
index 47aeeedb4..fa2248e3b 100644
--- a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -767,13 +767,11 @@ ngx_http_uwsgi_eval(ngx_http_request_t *r, ngx_http_uwsgi_loc_conf_t * uwcf)
if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
+ u->resolved->name = url.addrs[0].name;
u->resolved->naddrs = 1;
- u->resolved->host = url.addrs[0].name;
-
- } else {
- u->resolved->host = url.host;
}
+ u->resolved->host = url.host;
u->resolved->port = url.port;
u->resolved->no_port = url.no_port;