mirror of
https://github.com/nginx/nginx.git
synced 2024-12-25 08:21:13 -06:00
fix case when URL has no port, but has ":" in URI part,
the bug has been introduced in r2204
This commit is contained in:
parent
571a5e1512
commit
c239da5055
@ -264,7 +264,7 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
|
||||
port = ngx_strlchr(host, last, ':');
|
||||
|
||||
uri = ngx_strlchr(port ? port : host, last, '/');
|
||||
uri = ngx_strlchr(host, last, '/');
|
||||
|
||||
if (uri) {
|
||||
if (u->listen || !u->uri_part) {
|
||||
@ -276,6 +276,10 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
u->uri.data = uri;
|
||||
|
||||
last = uri;
|
||||
|
||||
if (uri < port) {
|
||||
port = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (port) {
|
||||
|
Loading…
Reference in New Issue
Block a user