]> git.mxchange.org Git - friendica.git/commitdiff
Correct content type
authorMichael <heluecht@pirati.ca>
Sun, 30 Sep 2018 14:13:07 +0000 (14:13 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 30 Sep 2018 14:13:07 +0000 (14:13 +0000)
mod/profile.php
src/Protocol/ActivityPub.php

index 8df63705e407980871a3711e9df2e14c9a271fed..e20836a0598cd55d2fb07f3b59fdff477a0abecc 100644 (file)
@@ -55,6 +55,7 @@ function profile_init(App $a)
                if (DBA::isResult($user)) {
                        $data = ActivityPub::profile($user['uid']);
                        echo json_encode($data);
+                       header('Content-Type: application/activity+json');
                        exit();
                }
        }
index ab5da4666cde647cec9701ba4891e0bc803b5cc8..cf9ca3dd4345e7526228b6879cafbf61519f5ab1 100644 (file)
@@ -834,8 +834,9 @@ class ActivityPub
        {
                $ret = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
                if (!$ret['success'] || empty($ret['body'])) {
-                       return;
+                       return false;
                }
+
                return json_decode($ret['body'], true);
        }