Mercurial > hg > nginx
comparison src/stream/ngx_stream_upstream.c @ 6459:78fc2dce69e7
Stream: detect port absence in proxy_pass with IP literal.
This is a clone of http commit 26c127bab5ef.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 23 Mar 2016 17:45:15 +0300 |
parents | cf5e822cf470 |
children | 2f41d383c9c7 |
comparison
equal
deleted
inserted
replaced
6458:384154fc634f | 6459:78fc2dce69e7 |
---|---|
386 uscf->file_name = cf->conf_file->file.name.data; | 386 uscf->file_name = cf->conf_file->file.name.data; |
387 uscf->line = cf->conf_file->line; | 387 uscf->line = cf->conf_file->line; |
388 uscf->port = u->port; | 388 uscf->port = u->port; |
389 uscf->no_port = u->no_port; | 389 uscf->no_port = u->no_port; |
390 | 390 |
391 if (u->naddrs == 1) { | 391 if (u->naddrs == 1 && (u->port || u->family == AF_UNIX)) { |
392 uscf->servers = ngx_array_create(cf->pool, 1, | 392 uscf->servers = ngx_array_create(cf->pool, 1, |
393 sizeof(ngx_stream_upstream_server_t)); | 393 sizeof(ngx_stream_upstream_server_t)); |
394 if (uscf->servers == NULL) { | 394 if (uscf->servers == NULL) { |
395 return NULL; | 395 return NULL; |
396 } | 396 } |