From e37b6bcd41560a229e23a812a72b6b44e54ed7f0 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 23 May 2017 19:38:47 +0000 Subject: [PATCH 1/2] Probing via web frontend shouldn't use the cache. --- mod/probe.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/probe.php b/mod/probe.php index abeccef446..dfd4792c9b 100644 --- a/mod/probe.php +++ b/mod/probe.php @@ -1,8 +1,7 @@ '; $o .= str_replace("\n", '
', print_r($res, true)); $o .= ''; From 07e318e991b71c31656d406aa79e5e928e0f2d75 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 23 May 2017 20:19:39 +0000 Subject: [PATCH 2/2] some more logging --- src/Network/Probe.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 2901ead0e4..5606332849 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -79,6 +79,8 @@ class Probe { $xrd_timeout = Config::get('system', 'xrd_timeout', 20); $redirects = 0; + 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) { return false; @@ -101,6 +103,7 @@ class Probe { $links = xml::element_to_array($xrd); if (!isset($links["xrd"]["link"])) { + logger("No xrd data found for ".$host, LOGGER_DEBUG); return false; } @@ -214,6 +217,7 @@ class Probe { } if (!$lrdd) { + logger("No lrdd data found for ".$uri, LOGGER_DEBUG); return array(); } @@ -249,6 +253,7 @@ class Probe { } if (!is_array($webfinger["links"])) { + logger("No webfinger links found for ".$uri, LOGGER_DEBUG); return false; } @@ -435,6 +440,7 @@ class Probe { $addr = $uri; } else { + logger("Uri ".$uri." was not detectable", LOGGER_DEBUG); return false; } @@ -544,6 +550,7 @@ class Probe { $webfinger = json_decode($data, true); if (!isset($webfinger["links"])) { + logger("No json webfinger links for ".$url, LOGGER_DEBUG); return false; } @@ -552,6 +559,7 @@ class Probe { $xrd_arr = xml::element_to_array($xrd); if (!isset($xrd_arr["xrd"]["link"])) { + logger("No XML webfinger links for ".$url, LOGGER_DEBUG); return false; } @@ -599,11 +607,13 @@ class Probe { } $content = $ret['body']; if (!$content) { + logger("Empty body for ".$noscrape_url, LOGGER_DEBUG); return false; } $json = json_decode($content, true); if (!is_array($json)) { + logger("No json data for ".$noscrape_url, LOGGER_DEBUG); return false; }