]> git.mxchange.org Git - friendica.git/commitdiff
Use a more specific "accept" value
authorMichael <heluecht@pirati.ca>
Tue, 29 Mar 2022 14:02:10 +0000 (14:02 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 29 Mar 2022 14:02:10 +0000 (14:02 +0000)
src/Network/Probe.php
src/Worker/Directory.php

index 9ffbc3e0fb95fba8bd0b1aedd67e88db4142d237..1a44bcbc00319439c8bd374f2e86bcfe031ecc1b 100644 (file)
@@ -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;
                }
index db199a856d3b2e0a8824247b3ed67f73d3d212e9..d977e522d0062c883ae768c255eba45d40314e94 100644 (file)
@@ -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;