mirror of
https://github.com/friendica/friendica
synced 2025-05-12 17:44:10 +02:00
Centralized logging for a wrong JSON content-type
This commit is contained in:
parent
013bba50bc
commit
d9bedbb473
4 changed files with 13 additions and 9 deletions
|
@ -208,8 +208,7 @@ 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]);
|
||||
} elseif (!$failed && !HTTPSignature::isValidContentType($curlResult->getContentType(), $url)) {
|
||||
$failed = true;
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue