mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 09:04:26 +02:00
Happy New Year 2023!
This commit is contained in:
parent
7942881f7e
commit
1874a32728
1139 changed files with 1261 additions and 1261 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
@ -79,12 +79,12 @@ class Network
|
|||
if (in_array(parse_url($url, PHP_URL_SCHEME), ['https', 'http'])) {
|
||||
$options = [HttpClientOptions::VERIFY => true, HttpClientOptions::TIMEOUT => $xrd_timeout];
|
||||
$curlResult = DI::httpClient()->head($url, $options);
|
||||
|
||||
|
||||
// Workaround for systems that can't handle a HEAD request. Don't retry on timeouts.
|
||||
if (!$curlResult->isSuccess() && ($curlResult->getReturnCode() >= 400) && !in_array($curlResult->getReturnCode(), [408, 504])) {
|
||||
$curlResult = DI::httpClient()->get($url, HttpClientAccept::DEFAULT, $options);
|
||||
}
|
||||
|
||||
|
||||
if (!$curlResult->isSuccess()) {
|
||||
Logger::notice('Url not reachable', ['host' => $host, 'url' => $url]);
|
||||
return false;
|
||||
|
@ -481,7 +481,7 @@ class Network
|
|||
$scheme = $get('scheme');
|
||||
$query = $get('query');
|
||||
$fragment = $get('fragment');
|
||||
$authority = ($userinfo !== null ? $userinfo . '@' : '') .
|
||||
$authority = ($userinfo !== null ? $userinfo . '@' : '') .
|
||||
$get('host') .
|
||||
($port ? ":$port" : '');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue