Centralized logging for a wrong JSON content-type

This commit is contained in:
Michael 2024-03-08 13:48:21 +00:00
parent 013bba50bc
commit d9bedbb473
4 changed files with 13 additions and 9 deletions

View file

@ -1618,8 +1618,7 @@ class Processor
return '';
}
if (!HTTPSignature::isValidContentType($curlResult->getContentType())) {
Logger::notice('Unexpected content type', ['content-type' => $curlResult->getContentType(), 'url' => $url]);
if (!HTTPSignature::isValidContentType($curlResult->getContentType(), $url)) {
return '';
}