mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
Stream: detect port absence in proxy_pass with IP literal.
This is a clone of http commit 26c127bab5ef.
This commit is contained in:
parent
f625ad7ce8
commit
3c48fd7c05
@ -388,7 +388,7 @@ ngx_stream_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
|
|||||||
uscf->port = u->port;
|
uscf->port = u->port;
|
||||||
uscf->no_port = u->no_port;
|
uscf->no_port = u->no_port;
|
||||||
|
|
||||||
if (u->naddrs == 1) {
|
if (u->naddrs == 1 && (u->port || u->family == AF_UNIX)) {
|
||||||
uscf->servers = ngx_array_create(cf->pool, 1,
|
uscf->servers = ngx_array_create(cf->pool, 1,
|
||||||
sizeof(ngx_stream_upstream_server_t));
|
sizeof(ngx_stream_upstream_server_t));
|
||||||
if (uscf->servers == NULL) {
|
if (uscf->servers == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user