Remove accept parameter for head/post again

This commit is contained in:
Philipp 2022-04-03 19:33:09 +02:00
parent 4aeccd3157
commit 04866195b4
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
12 changed files with 54 additions and 57 deletions

View file

@ -1204,7 +1204,7 @@ class BBCode
$text = DI::cache()->get($cache_key);
if (is_null($text)) {
$curlResult = DI::httpClient()->head($match[1], HttpClientAccept::DEFAULT, [HttpClientOptions::TIMEOUT => DI::config()->get('system', 'xrd_timeout')]);
$curlResult = DI::httpClient()->head($match[1], [HttpClientOptions::TIMEOUT => DI::config()->get('system', 'xrd_timeout')]);
if ($curlResult->isSuccess()) {
$mimetype = $curlResult->getHeader('Content-Type')[0] ?? '';
} else {
@ -1275,7 +1275,7 @@ class BBCode
return $text;
}
$curlResult = DI::httpClient()->head($match[1], HttpClientAccept::DEFAULT, [HttpClientOptions::TIMEOUT => DI::config()->get('system', 'xrd_timeout')]);
$curlResult = DI::httpClient()->head($match[1], [HttpClientOptions::TIMEOUT => DI::config()->get('system', 'xrd_timeout')]);
if ($curlResult->isSuccess()) {
$mimetype = $curlResult->getHeader('Content-Type')[0] ?? '';
} else {