aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_inet.c6
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) {