mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 05:33:52 -06:00
Fixed URL parsing code.
The URL parsing code is not expected to initialize port from default port when in "no_resolve" mode. This got broken in r4671 for the case of IPv6 literals.
This commit is contained in:
parent
bbf7043fe7
commit
2f8c1b73b8
@ -828,6 +828,11 @@ ngx_parse_inet6_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
|
||||
} else {
|
||||
u->no_port = 1;
|
||||
|
||||
if (!u->no_resolve) {
|
||||
u->port = u->default_port;
|
||||
sin6->sin6_port = htons(u->default_port);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -850,11 +855,6 @@ ngx_parse_inet6_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
u->wildcard = 1;
|
||||
}
|
||||
|
||||
if (u->no_port) {
|
||||
u->port = u->default_port;
|
||||
sin6->sin6_port = htons(u->default_port);
|
||||
}
|
||||
|
||||
u->family = AF_INET6;
|
||||
u->naddrs = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user