mirror of
https://github.com/friendica/friendica
synced 2025-04-28 19:44:23 +02:00
"Network::unparseURL" is replaced with "Uri::fromParts"
This commit is contained in:
parent
a6f3c961dc
commit
1c66d49599
9 changed files with 17 additions and 49 deletions
|
@ -33,6 +33,7 @@ use GuzzleHttp\Client;
|
|||
use GuzzleHttp\Cookie\FileCookieJar;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Exception\TransferException;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
use GuzzleHttp\RequestOptions;
|
||||
use mattwright\URLResolver;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
@ -104,7 +105,7 @@ class HttpClient implements ICanSendHttpRequests
|
|||
}
|
||||
}
|
||||
$parts['path'] = implode('/', $parts2);
|
||||
$url = Network::unparseURL($parts);
|
||||
$url = (string)Uri::fromParts((array)$parts);
|
||||
|
||||
if (Network::isUrlBlocked($url)) {
|
||||
$this->logger->info('Domain is blocked.', ['url' => $url]);
|
||||
|
|
|
@ -21,10 +21,9 @@
|
|||
|
||||
namespace Friendica\Network\HTTPClient\Response;
|
||||
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses;
|
||||
use Friendica\Network\HTTPException\UnprocessableEntityException;
|
||||
use Friendica\Util\Network;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
|
@ -224,7 +223,7 @@ class CurlResult implements ICanHandleHttpResponses
|
|||
}
|
||||
}
|
||||
|
||||
$this->redirectUrl = Network::unparseURL($redirect_parts);
|
||||
$this->redirectUrl = (string)Uri::fromParts((array)$redirect_parts);
|
||||
|
||||
$this->isRedirectUrl = true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue