From e8440853b1e33a6e51981a571badb165bad4d3c6 Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 1 Jul 2022 20:30:35 +0200 Subject: [PATCH] fix external storages access Signed-off-by: szaimen --- lib/private/Http/Client/ClientService.php | 4 +--- tests/lib/Http/Client/ClientServiceTest.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/private/Http/Client/ClientService.php b/lib/private/Http/Client/ClientService.php index e868d4af7a5..8484f2e80e6 100644 --- a/lib/private/Http/Client/ClientService.php +++ b/lib/private/Http/Client/ClientService.php @@ -28,7 +28,6 @@ namespace OC\Http\Client; use GuzzleHttp\Client as GuzzleClient; use GuzzleHttp\HandlerStack; -use GuzzleHttp\Handler\CurlHandler; use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; use OCP\ICertificateManager; @@ -63,8 +62,7 @@ class ClientService implements IClientService { * @return Client */ public function newClient(): IClient { - $handler = new CurlHandler(); - $stack = HandlerStack::create($handler); + $stack = HandlerStack::create(); $stack->push($this->dnsPinMiddleware->addDnsPinning()); $client = new GuzzleClient(['handler' => $stack]); diff --git a/tests/lib/Http/Client/ClientServiceTest.php b/tests/lib/Http/Client/ClientServiceTest.php index 94f4d51ecee..395e6726131 100644 --- a/tests/lib/Http/Client/ClientServiceTest.php +++ b/tests/lib/Http/Client/ClientServiceTest.php @@ -10,7 +10,6 @@ namespace Test\Http\Client; use GuzzleHttp\Client as GuzzleClient; use GuzzleHttp\HandlerStack; -use GuzzleHttp\Handler\CurlHandler; use OC\Http\Client\Client; use OC\Http\Client\ClientService; use OC\Http\Client\DnsPinMiddleware; @@ -42,8 +41,7 @@ class ClientServiceTest extends \Test\TestCase { $localAddressChecker ); - $handler = new CurlHandler(); - $stack = HandlerStack::create($handler); + $stack = HandlerStack::create(); $stack->push($dnsPinMiddleware->addDnsPinning()); $guzzleClient = new GuzzleClient(['handler' => $stack]); -- 2.39.5