mirror of
https://github.com/friendica/friendica
synced 2025-04-30 21:44:22 +02: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
|
@ -109,12 +109,11 @@ class Probe
|
|||
$url = "http://".$host."/.well-known/host-meta";
|
||||
|
||||
$xrd_timeout = Config::get('system', 'xrd_timeout', 20);
|
||||
$redirects = 0;
|
||||
|
||||
Logger::log("Probing for ".$host, Logger::DEBUG);
|
||||
$xrd = null;
|
||||
|
||||
$curlResult = Network::curl($ssl_url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
|
||||
$curlResult = Network::curl($ssl_url, false, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
|
||||
if ($curlResult->isSuccess()) {
|
||||
$xml = $curlResult->getBody();
|
||||
$xrd = XML::parseString($xml, false);
|
||||
|
@ -122,7 +121,7 @@ class Probe
|
|||
}
|
||||
|
||||
if (!is_object($xrd)) {
|
||||
$curlResult = Network::curl($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
|
||||
$curlResult = Network::curl($url, false, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
|
||||
if ($curlResult->isTimeout()) {
|
||||
Logger::log("Probing timeout for " . $url, Logger::DEBUG);
|
||||
self::$istimeout = true;
|
||||
|
@ -738,9 +737,8 @@ class Probe
|
|||
private static function webfinger($url, $type)
|
||||
{
|
||||
$xrd_timeout = Config::get('system', 'xrd_timeout', 20);
|
||||
$redirects = 0;
|
||||
|
||||
$curlResult = Network::curl($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => $type]);
|
||||
$curlResult = Network::curl($url, false, ['timeout' => $xrd_timeout, 'accept_content' => $type]);
|
||||
if ($curlResult->isTimeout()) {
|
||||
self::$istimeout = true;
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue