mirror of
https://github.com/nginx/nginx.git
synced 2024-11-29 20:24:21 -06:00
Code reduction (no functional changes).
This commit is contained in:
parent
2195eb554b
commit
887f514e9f
@ -634,10 +634,7 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
args = ngx_strlchr(host, last, '?');
|
||||
|
||||
if (args) {
|
||||
if (uri == NULL) {
|
||||
uri = args;
|
||||
|
||||
} else if (args < uri) {
|
||||
if (uri == NULL || args < uri) {
|
||||
uri = args;
|
||||
}
|
||||
}
|
||||
@ -663,11 +660,6 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
|
||||
len = last - port;
|
||||
|
||||
if (len == 0) {
|
||||
u->err = "invalid port";
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
n = ngx_atoi(port, len);
|
||||
|
||||
if (n < 1 || n > 65535) {
|
||||
@ -774,11 +766,7 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
if (ngx_inet_resolve_host(pool, u) != NGX_OK) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
return ngx_inet_resolve_host(pool, u);
|
||||
}
|
||||
|
||||
|
||||
@ -827,11 +815,6 @@ ngx_parse_inet6_url(ngx_pool_t *pool, ngx_url_t *u)
|
||||
|
||||
len = last - port;
|
||||
|
||||
if (len == 0) {
|
||||
u->err = "invalid port";
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
n = ngx_atoi(port, len);
|
||||
|
||||
if (n < 1 || n > 65535) {
|
||||
|
Loading…
Reference in New Issue
Block a user