aboutsummaryrefslogtreecommitdiff
path: root/p/api
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-08-20 12:22:56 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-08-20 12:22:56 +0200
commit2af3abc89e56af75c38caf5e8071b3cd09bedba8 (patch)
treedc7e1cb7a31c039ec451d7788ae9d73bc336a6ee /p/api
parente315192c4b3df89dddb1ac37c6c7a01531d7952f (diff)
parentf9359cd406bafdbb1ffaa8bad8a5810a02efc820 (diff)
Merge branch 'FreshRSS/dev' into PostgreSQL
Diffstat (limited to 'p/api')
-rw-r--r--p/api/pshb.php2
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');