Added 'Accept: application/json' to every “gurl” call
This commit is contained in:
parent
63c619399d
commit
618ebfa54b
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue