From 94b7c1fc7728b994d7940cf764652a6d9e7c1939 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 29 Mar 2022 14:02:10 +0000 Subject: [PATCH] Use a more specific "accept" value --- src/Network/Probe.php | 3 +-- src/Worker/Directory.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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;