aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-08-16 10:16:33 +0200
committerMario Vavti <mario@mariovavti.com>2017-08-16 10:16:33 +0200
commit1c5629263bcb4d6b3ffad23fc4571de20eeab029 (patch)
tree4eb3276fe828ce7c424227e2165be2ce6e4347cb /Zotlabs/Module
parent2a482223935ed02e275214093ab25b6ef1261381 (diff)
parent4addde782e8d79e6ac1a964af4fb9197f74d3dfb (diff)
downloadvolse-hubzilla-1c5629263bcb4d6b3ffad23fc4571de20eeab029.tar.gz
volse-hubzilla-1c5629263bcb4d6b3ffad23fc4571de20eeab029.tar.bz2
volse-hubzilla-1c5629263bcb4d6b3ffad23fc4571de20eeab029.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Ap_probe.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Module/Ap_probe.php b/Zotlabs/Module/Ap_probe.php
index 29629a8eb..57e254267 100644
--- a/Zotlabs/Module/Ap_probe.php
+++ b/Zotlabs/Module/Ap_probe.php
@@ -2,7 +2,7 @@
namespace Zotlabs\Module;
require_once('include/zot.php');
-
+require_once('addon/pubcrawl/HTTPSig.php');
class Ap_probe extends \Zotlabs\Web\Controller {
@@ -21,16 +21,19 @@ class Ap_probe extends \Zotlabs\Web\Controller {
$addr = $_GET['addr'];
if($_GET['magenv']) {
- $headers = 'Accept: application/magic-envelope+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
+ $headers = 'Accept: application/magic-envelope+json, application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
}
else {
- $headers = 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
+ $headers = 'Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
}
$redirects = 0;
$x = z_fetch_url($addr,true,$redirects, [ 'headers' => [ $headers ]]);
if($x['success'])
$o .= '<pre>' . $x['header'] . '</pre>' . EOL;
+
+ $o .= 'verify returns: ' . \HTTPSig::verify($x) . EOL;
+
$o .= '<pre>' . str_replace(['\\n','\\'],["\n",''],jindent($x['body'])) . '</pre>';
}
return $o;