diff options
author | Roman Arutyunyan <arut@nginx.com> | 2016-03-23 17:45:15 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2016-03-23 17:45:15 +0300 |
commit | 3c48fd7c0544652c26b51a6a98e807165a3cd66a (patch) | |
tree | f1aa56375213dbd9570ce58a9e8d922d8b029c0f | |
parent | f625ad7ce80f66911e31bcd9a92729ad5d8d771f (diff) | |
download | nginx-3c48fd7c0544652c26b51a6a98e807165a3cd66a.tar.gz nginx-3c48fd7c0544652c26b51a6a98e807165a3cd66a.zip |
Stream: detect port absence in proxy_pass with IP literal.
This is a clone of http commit 26c127bab5ef.
-rw-r--r-- | src/stream/ngx_stream_upstream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream/ngx_stream_upstream.c b/src/stream/ngx_stream_upstream.c index 805ee7029..69dddc5b4 100644 --- a/src/stream/ngx_stream_upstream.c +++ b/src/stream/ngx_stream_upstream.c @@ -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->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, sizeof(ngx_stream_upstream_server_t)); if (uscf->servers == NULL) { |