Merge pull request #34751 from nextcloud/backport/33087/stable23

[stable23] fix external storages access
This commit is contained in:
Simon L 2022-10-23 16:53:52 +02:00 committed by GitHub
commit e3527fdb50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View file

@ -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;
@ -68,8 +67,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]);

View file

@ -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;
@ -45,8 +44,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]);