Probing sometimes failed / problems with some web servers

This commit is contained in:
Michael 2017-08-24 07:56:46 +00:00
parent 6998897a34
commit c09c806f78
2 changed files with 8 additions and 6 deletions

View file

@ -104,13 +104,10 @@ class Probe {
logger("Probing for ".$host, LOGGER_DEBUG);
$ret = z_fetch_url($ssl_url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
if (($ret['errno'] == CURLE_OPERATION_TIMEDOUT) && !self::ownHost($ssl_url)) {
logger("Probing timeout for ".$ssl_url, LOGGER_DEBUG);
return false;
if ($ret['success']) {
$xml = $ret['body'];
$xrd = parse_xml_string($xml, false);
}
$xml = $ret['body'];
$xrd = parse_xml_string($xml, false);
if (!is_object($xrd)) {
$ret = z_fetch_url($url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));