Use a more specific "accept" value
This commit is contained in:
parent
28e3eee91b
commit
94b7c1fc77
|
@ -834,8 +834,7 @@ class Probe
|
||||||
|
|
||||||
public static function pollZot($url, $data)
|
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_JSON]);
|
||||||
$curlResult = DI::httpClient()->get($url, [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_DEFAULT]);
|
|
||||||
if ($curlResult->isTimeout()) {
|
if ($curlResult->isTimeout()) {
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Directory
|
||||||
|
|
||||||
Logger::info('Updating directory: ' . $arr['url']);
|
Logger::info('Updating directory: ' . $arr['url']);
|
||||||
if (strlen($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;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue