mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Some code rewriting in ap_proxy_connect_handler():
*) Fixed bug where a hostname without a "." in it (such as "localhost") would not trigger an IP address check with ProxyBlock. *) Fixed ProxyBlock bugs with ap_proxy_http_handler() and ap_proxy_connect_handler(). *) Updated ap_proxy_connect_handler() to support APR, while moving some common code between http_handler and connect_handler to proxy_util.c. PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -553,16 +553,15 @@ static const char *
|
||||
|
||||
/* Don't duplicate entries */
|
||||
for (i = 0; i < conf->noproxies->nelts; i++) {
|
||||
if (strcasecmp(arg, list[i].name) == 0) /* ignore case for host names */
|
||||
if (apr_strnatcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
new = apr_array_push(conf->noproxies);
|
||||
new->name = arg;
|
||||
/* Don't do name lookups on things that aren't dotted */
|
||||
if (ap_strchr_c(arg, '.') != NULL &&
|
||||
apr_sockaddr_info_get(&addr, new->name, APR_UNSPEC, 0, 0, parms->pool)) {
|
||||
if (APR_SUCCESS == apr_sockaddr_info_get(&addr, new->name, APR_UNSPEC, 0, 0, parms->pool)) {
|
||||
new->addr = addr;
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user