[nginx] Upstream: support for port in proxy_bind and friends.
Roman Arutyunyan
arut at nginx.com
Mon Jun 20 09:50:06 UTC 2016
details: http://hg.nginx.org/nginx/rev/3c87b82b17d4
branches:
changeset: 6594:3c87b82b17d4
user: Roman Arutyunyan <arut at nginx.com>
date: Mon Jun 20 11:50:43 2016 +0300
description:
Upstream: support for port in proxy_bind and friends.
diffstat:
src/http/ngx_http_upstream.c | 5 +++--
src/stream/ngx_stream_proxy_module.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r b3b7e33083ac -r 3c87b82b17d4 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Mon Jun 20 11:50:39 2016 +0300
+++ b/src/http/ngx_http_upstream.c Mon Jun 20 11:50:43 2016 +0300
@@ -5828,7 +5828,8 @@ ngx_http_upstream_bind_set_slot(ngx_conf
return NGX_CONF_ERROR;
}
- rc = ngx_parse_addr(cf->pool, local->addr, value[1].data, value[1].len);
+ rc = ngx_parse_addr_port(cf->pool, local->addr, value[1].data,
+ value[1].len);
switch (rc) {
case NGX_OK:
@@ -5900,7 +5901,7 @@ ngx_http_upstream_set_local(ngx_http_req
return NGX_ERROR;
}
- rc = ngx_parse_addr(r->pool, addr, val.data, val.len);
+ rc = ngx_parse_addr_port(r->pool, addr, val.data, val.len);
if (rc == NGX_ERROR) {
return NGX_ERROR;
}
diff -r b3b7e33083ac -r 3c87b82b17d4 src/stream/ngx_stream_proxy_module.c
--- a/src/stream/ngx_stream_proxy_module.c Mon Jun 20 11:50:39 2016 +0300
+++ b/src/stream/ngx_stream_proxy_module.c Mon Jun 20 11:50:43 2016 +0300
@@ -1720,7 +1720,8 @@ ngx_stream_proxy_bind(ngx_conf_t *cf, ng
return NGX_CONF_ERROR;
}
- rc = ngx_parse_addr(cf->pool, local->addr, value[1].data, value[1].len);
+ rc = ngx_parse_addr_port(cf->pool, local->addr, value[1].data,
+ value[1].len);
switch (rc) {
case NGX_OK:
More information about the nginx-devel
mailing list