mirror of
https://github.com/friendica/friendica
synced 2025-04-24 00:30:11 +00:00
Request type set for all HTTP requests
This commit is contained in:
parent
d788cb82cc
commit
5751e024c0
30 changed files with 129 additions and 90 deletions
|
@ -369,7 +369,7 @@ class Photo extends BaseApi
|
|||
$update = in_array($contact['network'], Protocol::FEDERATED) && !$contact['failed']
|
||||
&& ((time() - strtotime($contact['updated']) > 86400));
|
||||
if ($update) {
|
||||
$curlResult = DI::httpClient()->head($url, [HttpClientOptions::ACCEPT_CONTENT => HttpClientAccept::IMAGE, HttpClientOptions::REQUEST => HttpClientRequest::MEDIAPROXY]);
|
||||
$curlResult = DI::httpClient()->head($url, [HttpClientOptions::ACCEPT_CONTENT => HttpClientAccept::IMAGE, HttpClientOptions::REQUEST => HttpClientRequest::CONTENTTYPE]);
|
||||
$update = !$curlResult->isSuccess() && ($curlResult->getReturnCode() == 404);
|
||||
Logger::debug('Got return code for avatar', ['return code' => $curlResult->getReturnCode(), 'cid' => $id, 'url' => $contact['url'], 'avatar' => $url]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue