Mercurial > hg > nginx-quic
changeset 2283:231b52f8adc0
fix case when URL has no port, but has ":" in URI part,
the bug has been introduced in r2204
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 24 Oct 2008 15:12:11 +0000 |
parents | ec97eb9a8038 |
children | c3035feb6638 |
files | src/core/ngx_inet.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 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 u->uri.data = uri; last = uri; + + if (uri < port) { + port = NULL; + } } if (port) {