summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2022-10-23 21:57:16 +0200
committerszaimen <szaimen@e.mail.de>2022-10-23 22:36:34 +0200
commit11108e8032191e4a082e8cd249033ea2451e32cf (patch)
tree14240bc2214df5a302b1ac5e715091f103594468
parent304c1b9b61b20dfa3c1f07e8a914f0661d91704d (diff)
downloadnextcloud-server-11108e8032191e4a082e8cd249033ea2451e32cf.tar.gz
nextcloud-server-11108e8032191e4a082e8cd249033ea2451e32cf.zip
Revert "fix external storages access"
Signed-off-by: szaimen <szaimen@e.mail.de>
-rw-r--r--lib/private/Http/Client/ClientService.php4
-rw-r--r--tests/lib/Http/Client/ClientServiceTest.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Http/Client/ClientService.php b/lib/private/Http/Client/ClientService.php
index 8484f2e80e6..e868d4af7a5 100644
--- a/lib/private/Http/Client/ClientService.php
+++ b/lib/private/Http/Client/ClientService.php
@@ -28,6 +28,7 @@ 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;
@@ -62,7 +63,8 @@ class ClientService implements IClientService {
* @return Client
*/
public function newClient(): IClient {
- $stack = HandlerStack::create();
+ $handler = new CurlHandler();
+ $stack = HandlerStack::create($handler);
$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 395e6726131..94f4d51ecee 100644
--- a/tests/lib/Http/Client/ClientServiceTest.php
+++ b/tests/lib/Http/Client/ClientServiceTest.php
@@ -10,6 +10,7 @@ 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;
@@ -41,7 +42,8 @@ class ClientServiceTest extends \Test\TestCase {
$localAddressChecker
);
- $stack = HandlerStack::create();
+ $handler = new CurlHandler();
+ $stack = HandlerStack::create($handler);
$stack->push($dnsPinMiddleware->addDnsPinning());
$guzzleClient = new GuzzleClient(['handler' => $stack]);