mirror of
https://github.com/friendica/friendica
synced 2025-04-27 23:10:12 +00:00
Move internal recursion-counter to the end of all cur/fetchUrl parameters
This commit is contained in:
parent
10683a43c8
commit
cc7444d84d
15 changed files with 34 additions and 38 deletions
|
@ -74,7 +74,7 @@ class ActivityPub
|
|||
return HTTPSignature::fetch($url, $uid);
|
||||
}
|
||||
|
||||
$curlResult = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
|
||||
$curlResult = Network::curl($url, false, ['accept_content' => 'application/activity+json, application/ld+json']);
|
||||
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -738,7 +738,7 @@ class OStatus
|
|||
|
||||
self::$conv_list[$conversation] = true;
|
||||
|
||||
$curlResult = Network::curl($conversation, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
$curlResult = Network::curl($conversation, false, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
|
||||
if (!$curlResult->isSuccess()) {
|
||||
return;
|
||||
|
@ -931,7 +931,7 @@ class OStatus
|
|||
}
|
||||
|
||||
$stored = false;
|
||||
$curlResult = Network::curl($related, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
$curlResult = Network::curl($related, false, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
|
||||
if (!$curlResult->isSuccess()) {
|
||||
return;
|
||||
|
|
|
@ -1004,7 +1004,7 @@ class PortableContact
|
|||
$server_url = str_replace("http://", "https://", $server_url);
|
||||
|
||||
// We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
|
||||
$curlResult = Network::curl($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
|
||||
$curlResult = Network::curl($server_url."/.well-known/host-meta", false, ['timeout' => 20]);
|
||||
|
||||
// Quit if there is a timeout.
|
||||
// But we want to make sure to only quit if we are mostly sure that this server url fits.
|
||||
|
@ -1021,7 +1021,7 @@ class PortableContact
|
|||
$server_url = str_replace("https://", "http://", $server_url);
|
||||
|
||||
// We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
|
||||
$curlResult = Network::curl($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
|
||||
$curlResult = Network::curl($server_url."/.well-known/host-meta", false, ['timeout' => 20]);
|
||||
|
||||
// Quit if there is a timeout
|
||||
if ($curlResult->isTimeout()) {
|
||||
|
@ -1624,7 +1624,7 @@ class PortableContact
|
|||
if (!empty($accesstoken)) {
|
||||
$api = 'https://instances.social/api/1.0/instances/list?count=0';
|
||||
$header = ['Authorization: Bearer '.$accesstoken];
|
||||
$curlResult = Network::curl($api, false, $redirects, ['headers' => $header]);
|
||||
$curlResult = Network::curl($api, false, ['headers' => $header]);
|
||||
|
||||
if ($curlResult->isSuccess()) {
|
||||
$servers = json_decode($curlResult->getBody(), true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue