From: Michael Date: Tue, 29 Mar 2022 14:02:10 +0000 (+0000) Subject: Use a more specific "accept" value X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=94b7c1fc7728b994d7940cf764652a6d9e7c1939;p=friendica.git Use a more specific "accept" value --- diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 9ffbc3e0fb..1a44bcbc00 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -834,8 +834,7 @@ class Probe public static function pollZot($url, $data) { - // @todo Check if this endpoint might be queried via a POST - $curlResult = DI::httpClient()->get($url, [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_DEFAULT]); + $curlResult = DI::httpClient()->get($url, [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_JSON]); if ($curlResult->isTimeout()) { return $data; } diff --git a/src/Worker/Directory.php b/src/Worker/Directory.php index db199a856d..d977e522d0 100644 --- a/src/Worker/Directory.php +++ b/src/Worker/Directory.php @@ -54,7 +54,7 @@ class Directory Logger::info('Updating directory: ' . $arr['url']); if (strlen($arr['url'])) { - DI::httpClient()->fetch($dir . '?url=' . bin2hex($arr['url']), 0, HttpClient::ACCEPT_DEFAULT); + DI::httpClient()->fetch($dir . '?url=' . bin2hex($arr['url']), 0, HttpClient::ACCEPT_HTML); } return;