use Friendica\Model\APContact;
use Friendica\Model\Contact;
use Friendica\Model\User;
use Friendica\Model\APContact;
use Friendica\Model\Contact;
use Friendica\Model\User;
foreach ($_SERVER as $k => $v) {
if (strpos($k, 'HTTP_') === 0) {
foreach ($_SERVER as $k => $v) {
if (strpos($k, 'HTTP_') === 0) {
$x = Crypto::rsaVerify($signed_data, $sig_block['signature'], $key, $algorithm);
$x = Crypto::rsaVerify($signed_data, $sig_block['signature'], $key, $algorithm);
$postResult = DI::httpClient()->post($target, $content, $headers);
$return_code = $postResult->getReturnCode();
$postResult = DI::httpClient()->post($target, $content, $headers);
$return_code = $postResult->getReturnCode();
- public static function fetchRaw($request, $uid = 0, $opts = ['accept_content' => ['application/activity+json', 'application/ld+json']])
+ public static function fetchRaw($request, $uid = 0, $opts = ['accept_content' => ['application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"']])
if (!empty($opts['nobody'])) {
$curlResult = DI::httpClient()->head($request, $curl_opts);
if (!empty($opts['nobody'])) {
$curlResult = DI::httpClient()->head($request, $curl_opts);
public static function getSigner($content, $http_headers)
{
if (empty($http_headers['HTTP_SIGNATURE'])) {
public static function getSigner($content, $http_headers)
{
if (empty($http_headers['HTTP_SIGNATURE'])) {
if (in_array('date', $sig_block['headers'])) {
$diff = abs(strtotime($headers['date']) - time());
if ($diff > 300) {
if (in_array('date', $sig_block['headers'])) {
$diff = abs(strtotime($headers['date']) - time());
if ($diff > 300) {