Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix external storages access
Signed-off-by: szaimen <szaimen@e.mail.de>
  • Loading branch information
szaimen authored and backportbot-nextcloud[bot] committed Oct 23, 2022
commit 53787e2d3be0c81a9600a905c69ff2585fa3c3ef
4 changes: 1 addition & 3 deletions lib/private/Http/Client/ClientService.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

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;
Expand Down Expand Up @@ -68,8 +67,7 @@ public function __construct(IConfig $config,
* @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]);
Expand Down
4 changes: 1 addition & 3 deletions tests/lib/Http/Client/ClientServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

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;
Expand Down Expand Up @@ -45,8 +44,7 @@ public function testNewClient(): void {
$localAddressChecker
);

$handler = new CurlHandler();
$stack = HandlerStack::create($handler);
$stack = HandlerStack::create();
$stack->push($dnsPinMiddleware->addDnsPinning());
$guzzleClient = new GuzzleClient(['handler' => $stack]);

Expand Down