1
0
Fork 0

Detect failed gethostbyname, refs #2449

pull/2452/merge
Jordi Boggiano 2013-11-22 12:09:24 +01:00
parent 5156a60216
commit 730dcbb80a
1 changed files with 3 additions and 0 deletions

View File

@ -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 {