aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_inet.c')
-rw-r--r--src/core/ngx_inet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c
index acb2ef48a..2233e617b 100644
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -639,7 +639,11 @@ ngx_parse_addr_port(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text,
p = ngx_strlchr(text, last, ']');
- if (p == NULL || p == last - 1 || *++p != ':') {
+ if (p == last - 1) {
+ return ngx_parse_addr(pool, addr, text + 1, len - 2);
+ }
+
+ if (p == NULL || *++p != ':') {
return NGX_DECLINED;
}