Detect failed gethostbyname, refs #2449

main
Jordi Boggiano 11 years ago
parent 5156a60216
commit 730dcbb80a

@ -73,6 +73,9 @@ class NoProxyPattern
if (strpos($ruleHost, '/') === false) {
$match = $ip === $ruleHost;
} 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);
}
} else {

Loading…
Cancel
Save