]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsub.php
Merge branch '2019.01-rc' into bug/6334-escape-get-app
[friendica.git] / mod / pubsub.php
index f0a8d463c4517999d29773112e2aff9b45a4df13..8d6e81a68523e6e862661130205322eb5c5225dc 100644 (file)
@@ -7,8 +7,7 @@ use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Protocol\OStatus;
 use Friendica\Util\Strings;
-
-require_once 'include/items.php';
+use Friendica\Core\System;
 
 function hub_return($valid, $body)
 {
@@ -16,7 +15,7 @@ function hub_return($valid, $body)
                header($_SERVER["SERVER_PROTOCOL"] . ' 200 OK');
                echo $body;
        } else {
-               header($_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
+               System::httpExit(404);
        }
        killme();
 }
@@ -25,8 +24,7 @@ function hub_return($valid, $body)
 
 function hub_post_return()
 {
-       header($_SERVER["SERVER_PROTOCOL"] . ' 200 OK');
-       killme();
+       System::httpExit(200);
 }
 
 function pubsub_init(App $a)