]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "fix external storages access" 34756/head
authorSimon L <szaimen@e.mail.de>
Sun, 23 Oct 2022 19:57:16 +0000 (21:57 +0200)
committerszaimen <szaimen@e.mail.de>
Sun, 23 Oct 2022 20:36:34 +0000 (22:36 +0200)
Signed-off-by: szaimen <szaimen@e.mail.de>
lib/private/Http/Client/ClientService.php
tests/lib/Http/Client/ClientServiceTest.php

index 8484f2e80e6d53c9e0e4924711e8289d44e26696..e868d4af7a5223dc406ea6a8d2efca3c6c168dfa 100644 (file)
@@ -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]);
index 395e67261315f823000beadf3fb7f27761650ab4..94f4d51ecee8d59c26b2f6f97f75bb8fb6ccf86c 100644 (file)
@@ -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]);