first cut at zot-finger request signatures

This commit is contained in:
redmatrix
2016-05-21 18:02:14 -07:00
parent bf05012150
commit ed56b6e67b
2 changed files with 14 additions and 8 deletions

View File

@@ -20,17 +20,17 @@ class Probe extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
$addr = trim($_GET['addr']);
$do_import = ((intval($_GET['import']) && is_site_admin()) ? true : false);
$res = zot_finger($addr,$channel,false);
$j = \Zotlabs\Zot\Finger::run($addr,$channel,false);
// $res = zot_finger($addr,$channel,false);
$o .= '<pre>';
if($res['success'])
$j = json_decode($res['body'],true);
else {
if(! $j['success']) {
$o .= sprintf( t('Fetching URL returns error: %1$s'),$res['error'] . "\r\n\r\n");
$o .= "<strong>https connection failed. Trying again with auto failover to http.</strong>\r\n\r\n";
$res = zot_finger($addr,$channel,true);
if($res['success'])
$j = json_decode($res['body'],true);
else
$j = \Zotlabs\Zot\Finger::run($addr,$channel,true);
if(! $j['success'])
$o .= sprintf( t('Fetching URL returns error: %1$s'),$res['error'] . "\r\n\r\n");
}