X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FPubSubPublish.php;h=f9c311b2d9f5243842612e9fea2521d5d8c92adc;hb=80ff11e626b463e5c036122a227bdf4a2d640eb3;hp=2eb94eeb72cb837a30702bf20d42834d033cf96c;hpb=d09b3f5bdeae444f785f6283e55dbf2f61caadac;p=friendica.git diff --git a/src/Worker/PubSubPublish.php b/src/Worker/PubSubPublish.php index 2eb94eeb72..f9c311b2d9 100644 --- a/src/Worker/PubSubPublish.php +++ b/src/Worker/PubSubPublish.php @@ -1,6 +1,6 @@ ;rel=hub,<%s>;rel=self", + $headers = [ + 'Content-type' => 'application/atom+xml', + 'Link' => sprintf("<%s>;rel=hub,<%s>;rel=self", DI::baseUrl() . '/pubsubhubbub/' . $subscriber['nickname'], $subscriber['topic']), - "X-Hub-Signature: sha1=" . $hmac_sig]; + 'X-Hub-Signature' => 'sha1=' . $hmac_sig]; Logger::log('POST ' . print_r($headers, true) . "\n" . $params, Logger::DATA); - $postResult = Network::post($subscriber['callback_url'], $params, $headers); + $postResult = DI::httpClient()->post($subscriber['callback_url'], $params, $headers); $ret = $postResult->getReturnCode(); if ($ret >= 200 && $ret <= 299) {