Don't retry when fetching invalid content

This commit is contained in:
Michael 2024-03-09 10:37:43 +00:00
parent f041701765
commit 40a47b076d
2 changed files with 4 additions and 4 deletions

View file

@ -1611,15 +1611,15 @@ class Processor
if (empty($object) || !is_array($object)) {
Logger::notice('Invalid JSON data', ['url' => $url, 'content-type' => $curlResult->getContentType()]);
return '';
return null;
}
if (!self::isValidObject($object, $url)) {
return '';
return null;
}
if (!HTTPSignature::isValidContentType($curlResult->getContentType(), $url)) {
return '';
return null;
}
$ldobject = JsonLD::compact($object);