A free, self-hostable news aggregator…
PSHB: work-around for SuperFeeder
Alexandre Alapetite462c1e208f02
diff --git a/p/api/pshb.php b/p/api/pshb.phpindex 7de4cc1a2..136b98fc9 100644--- a/p/api/pshb.php+++ b/p/api/pshb.php@@ -65,11 +65,13 @@ if (!empty($_REQUEST['hub_mode']) && $_REQUEST['hub_mode'] === 'subscribe') {$hubJson['error'] = true; //Do not assume that PubSubHubbub works until the first successul push}file_put_contents('./!hub.json', json_encode($hubJson));+ header('Connection: close');exit(isset($_REQUEST['hub_challenge']) ? $_REQUEST['hub_challenge'] : '');}if (!empty($_REQUEST['hub_mode']) && $_REQUEST['hub_mode'] === 'unsubscribe') {if (empty($hubJson['lease_end']) || $hubJson['lease_end'] < time()) {+ header('Connection: close');exit(isset($_REQUEST['hub_challenge']) ? $_REQUEST['hub_challenge'] : '');} else {header('HTTP/1.1 422 Unprocessable Entity');