diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-10-24 19:12:11 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-10-24 19:12:11 +0400 |
commit | c239da505545b0d90c4a1cbd7b3e14be9ef3c998 (patch) | |
tree | 2516e1172fc859454ce25967b2b1c37a184a9b50 /src/core | |
parent | 571a5e1512bf760e260697d5786ea06349542884 (diff) |
fix case when URL has no port, but has ":" in URI part,
the bug has been introduced in r2204
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ngx_inet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c index 6568cecb7..e976c4cdb 100644 --- a/src/core/ngx_inet.c +++ b/src/core/ngx_inet.c @@ -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) { |