Request type set for all HTTP requests

This commit is contained in:
Michael 2024-05-12 17:53:21 +00:00
parent d788cb82cc
commit 5751e024c0
30 changed files with 129 additions and 90 deletions

View file

@ -29,6 +29,7 @@ use Friendica\Model\Profile;
use Friendica\Model\User;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Network\HTTPClient\Client\HttpClientOptions;
use Friendica\Network\HTTPClient\Client\HttpClientRequest;
use GuzzleHttp\Psr7\Uri;
/* This class is used to verify the homepage link of a user profile.
@ -64,7 +65,7 @@ class CheckRelMeProfileLink
}
$xrd_timeout = DI::config()->get('system', 'xrd_timeout');
$curlResult = DI::httpClient()->get($owner['homepage'], HttpClientAccept::HTML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
$curlResult = DI::httpClient()->get($owner['homepage'], HttpClientAccept::HTML, [HttpClientOptions::TIMEOUT => $xrd_timeout, HttpClientOptions::REQUEST => HttpClientRequest::CONTACTVERIFIER]);
if (!$curlResult->isSuccess()) {
Logger::notice('Could not cURL the homepage URL', ['owner homepage' => $owner['homepage']]);
return;