Merge pull request #3496 from annando/1705-more-logging
Some more logging for the probing
This commit is contained in:
commit
62891d8de9
1 changed files with 7 additions and 0 deletions
|
@ -83,6 +83,7 @@ class Probe {
|
||||||
|
|
||||||
$ret = z_fetch_url($ssl_url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
|
$ret = z_fetch_url($ssl_url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
||||||
|
logger("Probing timeout for ".$ssl_url, LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$xml = $ret['body'];
|
$xml = $ret['body'];
|
||||||
|
@ -92,12 +93,14 @@ class Probe {
|
||||||
if (!is_object($xrd)) {
|
if (!is_object($xrd)) {
|
||||||
$ret = z_fetch_url($url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
|
$ret = z_fetch_url($url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
||||||
|
logger("Probing timeout for ".$url, LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$xml = $ret['body'];
|
$xml = $ret['body'];
|
||||||
$xrd = parse_xml_string($xml, false);
|
$xrd = parse_xml_string($xml, false);
|
||||||
}
|
}
|
||||||
if (!is_object($xrd)) {
|
if (!is_object($xrd)) {
|
||||||
|
logger("No xrd object found for ".$host, LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,6 +136,8 @@ class Probe {
|
||||||
|
|
||||||
self::$baseurl = "http://".$host;
|
self::$baseurl = "http://".$host;
|
||||||
|
|
||||||
|
logger("Probing successful for ".$host, LOGGER_DEBUG);
|
||||||
|
|
||||||
return $xrd_data;
|
return $xrd_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,6 +409,7 @@ class Probe {
|
||||||
$lrdd = self::xrd($host);
|
$lrdd = self::xrd($host);
|
||||||
}
|
}
|
||||||
if (!$lrdd) {
|
if (!$lrdd) {
|
||||||
|
logger('No XRD data was found for '.$uri, LOGGER_DEBUG);
|
||||||
return self::feed($uri);
|
return self::feed($uri);
|
||||||
}
|
}
|
||||||
$nick = array_pop($path_parts);
|
$nick = array_pop($path_parts);
|
||||||
|
@ -435,6 +441,7 @@ class Probe {
|
||||||
$lrdd = self::xrd($host);
|
$lrdd = self::xrd($host);
|
||||||
|
|
||||||
if (!$lrdd) {
|
if (!$lrdd) {
|
||||||
|
logger('No XRD data was found for '.$uri, LOGGER_DEBUG);
|
||||||
return self::mail($uri, $uid);
|
return self::mail($uri, $uid);
|
||||||
}
|
}
|
||||||
$addr = $uri;
|
$addr = $uri;
|
||||||
|
|
Loading…
Reference in a new issue