Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/PubSubHubbub/Subscriber/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,14 @@ public function handle(array $httpGetData = null, $sendResponseNow = false)
* SHOULD be validated/processed by an asynchronous process so as
* to avoid holding up responses to the Hub.
*/
$contentType = $this->_getHeader('Content-Type');
if (strtolower($_SERVER['REQUEST_METHOD']) == 'post'
&& $this->_hasValidVerifyToken(null, false)
&& ($this->_getHeader('Content-Type') == 'application/atom+xml'
|| $this->_getHeader('Content-Type') == 'application/rss+xml'
|| $this->_getHeader('Content-Type') == 'application/xml'
|| $this->_getHeader('Content-Type') == 'text/xml'
|| $this->_getHeader('Content-Type') == 'application/rdf+xml')
&& (stripos($contentType, 'application/atom+xml') === 0
|| stripos($contentType, 'application/rss+xml') === 0
|| stripos($contentType, 'application/xml') === 0
|| stripos($contentType, 'text/xml') === 0
|| stripos($contentType, 'application/rdf+xml') === 0)
) {
$this->setFeedUpdate($this->_getRawBody());
$this->getHttpResponse()->setHeader('X-Hub-On-Behalf-Of', $this->getSubscriberCount());
Expand Down

0 comments on commit 7c64770

Please sign in to comment.