fix case when URL has no port, but has ":" in URI part,

the bug has been introduced in r2204
This commit is contained in:
Igor Sysoev 2008-10-24 15:12:11 +00:00
parent d7354d3695
commit f8ec8752a6
1 changed files with 5 additions and 1 deletions

View File

@ -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) {