From 462c1e208f02e4977c7e96c0f5936987931d5bc1 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 30 Jul 2016 23:37:13 +0200 Subject: PSHB: work-around for SuperFeeder Feeds using SuperFeeder for PubSubHubbub push had timeout problems during substription. SuperFeeder bot was returning 422 "We could not verify your callback Error: ETIMEDOUT" It seems to be due to the the fact that SuperFeeder bot uses keep-alive but expects the server to close the connection. https://github.com/FreshRSS/FreshRSS/issues/312#issuecomment-73716936 --- p/api/pshb.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p/api/pshb.php b/p/api/pshb.php index 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'); -- cgit v1.2.3 From fd0f719c0c5297f4342395a60249b1eb442e0586 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 14 Aug 2016 10:09:15 +0200 Subject: Readme SuperFeeder https://github.com/FreshRSS/FreshRSS/pull/1184 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50498da99..f0bb94c39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ * API * Add API link in FreshRSS profile settings to ease set-up [#1186](https://github.com/FreshRSS/FreshRSS/pull/1186) * Mics. + * Work-around for SuperFeeder time-outs during PubSubHubbub registration [#1184](https://github.com/FreshRSS/FreshRSS/pull/1184) * JSHint of JavaScript code and better initialisation [#1196](https://github.com/FreshRSS/FreshRSS/pull/1196) * Updated credits, and images in README [#1201](https://github.com/FreshRSS/FreshRSS/issues/1201) -- cgit v1.2.3