]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsub.php
Replace System::httpExit() by HTTPException throwing
[friendica.git] / mod / pubsub.php
index c5744f399b2443565525eb0293ef090f1a7875a0..e5ede6c80a3792da91512c2d95f8db61d52dd51d 100644 (file)
@@ -12,10 +12,9 @@ use Friendica\Core\System;
 function hub_return($valid, $body)
 {
        if ($valid) {
-               header($_SERVER["SERVER_PROTOCOL"] . ' 200 OK');
                echo $body;
        } else {
-               System::httpExit(404);
+               throw new \Friendica\Network\HTTPException\NotFoundException();
        }
        exit();
 }
@@ -24,7 +23,7 @@ function hub_return($valid, $body)
 
 function hub_post_return()
 {
-       System::httpExit(200);
+       throw new \Friendica\Network\HTTPException\OKException();
 }
 
 function pubsub_init(App $a)