diff options
| author | 2016-08-14 10:09:44 +0200 | |
|---|---|---|
| committer | 2016-08-14 10:09:44 +0200 | |
| commit | 722c0cb8b255e700282e080fde4aec241e7ccfa3 (patch) | |
| tree | ee2657e48d6d701ac8778f38fde4ccb573dfbd74 /p | |
| parent | a180485f9146f22d48470f3ba541317dbc2ee076 (diff) | |
| parent | fd0f719c0c5297f4342395a60249b1eb442e0586 (diff) | |
Merge pull request #1184 from Alkarex/SuperFeeder_timeout
PSHB: work-around for SuperFeeder
Diffstat (limited to 'p')
| -rw-r--r-- | p/api/pshb.php | 2 |
1 files changed, 2 insertions, 0 deletions
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'); |
