Revert "fix external storages access"

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
Simon L 2022-10-23 21:57:16 +02:00 committed by szaimen
parent 304c1b9b61
commit 11108e8032
2 changed files with 6 additions and 2 deletions

View 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]);

View 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]);