mirror of
https://github.com/friendica/friendica
synced 2025-05-07 23:04:10 +02:00
Check for activity pub mime types
This commit is contained in:
parent
cb294cf411
commit
892e0a5623
3 changed files with 24 additions and 5 deletions
|
@ -208,6 +208,9 @@ class APContact
|
|||
|
||||
if (!$failed && ($curlResult->getReturnCode() == 410)) {
|
||||
$data = ['@context' => ActivityPub::CONTEXT, 'id' => $url, 'type' => 'Tombstone'];
|
||||
} elseif (!$failed && !HTTPSignature::isValidContentType($curlResult->getContentType())) {
|
||||
Logger::debug('Unexpected content type', ['content-type' => $curlResult->getContentType(), 'url' => $url]);
|
||||
$failed = true;
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
Logger::notice('Error fetching url', ['url' => $url, 'exception' => $exception]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue