Detect failed gethostbyname, refs #2449
parent
5156a60216
commit
730dcbb80a
|
@ -73,6 +73,9 @@ class NoProxyPattern
|
||||||
if (strpos($ruleHost, '/') === false) {
|
if (strpos($ruleHost, '/') === false) {
|
||||||
$match = $ip === $ruleHost;
|
$match = $ip === $ruleHost;
|
||||||
} else {
|
} else {
|
||||||
|
if ($ip === $host) {
|
||||||
|
throw new \RuntimeException('gethostbyname() failed to resolve "'.$host.'" to an IP, can not evaluate NO_PROXY rules');
|
||||||
|
}
|
||||||
$match = self::inCIDRBlock($ruleHost, $ip);
|
$match = self::inCIDRBlock($ruleHost, $ip);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue