From 618ebfa54b5daebac842d9184da6bf8be07956de Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Sun, 31 Dec 2023 23:16:16 +0100 Subject: [PATCH] =?UTF-8?q?Added=20'Accept:=20application/json'=20to=20eve?= =?UTF-8?q?ry=20=E2=80=9Cgurl=E2=80=9D=20call?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/clitools/peerscrawl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/clitools/peerscrawl.php b/web/clitools/peerscrawl.php index feda438..8890597 100755 --- a/web/clitools/peerscrawl.php +++ b/web/clitools/peerscrawl.php @@ -256,7 +256,7 @@ function crawl(&$list,$id) { updexarr($id); waituntilonline($id); lecho(1,'round '.$id.': trying to load instance «'.$inst.'»’s peers...'.N); - $peers=gurl('https://'.$inst.'/api/v1/instance/peers',$opts['conntimeout'],$opts['functimeout']); + $peers=gurl('https://'.$inst.'/api/v1/instance/peers',$opts['conntimeout'],$opts['functimeout'],['Accept: application/json']); if ($peers['cont']===false) { lecho(2,'round '.$id.': could not load instance «'.$inst.'»’s peers: '.$peers['emsg'].'.'.N); } else { @@ -296,7 +296,7 @@ function crawl(&$list,$id) { } if (!$responded) { lecho(1,'round '.$id.': instance «'.$inst.'» didn’t respond at its “peers” endpoint; trying to load its info from “instance” endpoint...'.N); - $instinfo=gurl('https://'.$inst.'/api/v1/instance',$opts['conntimeout'],$opts['functimeout']); + $instinfo=gurl('https://'.$inst.'/api/v1/instance',$opts['conntimeout'],$opts['functimeout'],['Accept: application/json']); if ($instinfo['cont']===false) { lecho(2,'round '.$id.': could not load instance «'.$inst.'»’s info: '.$instinfo['emsg'].'.'.N); } else {