Skip to content

Commit

Permalink
Upstream: support for port in proxy_bind and friends.
Browse files Browse the repository at this point in the history
  • Loading branch information
arut committed Jun 20, 2016
1 parent 5b201ac commit 8cad1c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/http/ngx_http_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -5828,7 +5828,8 @@ ngx_http_upstream_bind_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
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:
Expand Down Expand Up @@ -5900,7 +5901,7 @@ ngx_http_upstream_set_local(ngx_http_request_t *r, ngx_http_upstream_t *u,
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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/stream/ngx_stream_proxy_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,8 @@ ngx_stream_proxy_bind(ngx_conf_t *cf, ngx_command_t *cmd, void *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:
Expand Down

0 comments on commit 8cad1c0

Please sign in to comment.