Skip to content

Commit

Permalink
Merge pull request #33087 from nextcloud/fix/30282/external-storages
Browse files Browse the repository at this point in the history
fix external storages access
  • Loading branch information
skjnldsv committed Oct 23, 2022
2 parents 54ce35e + 2ad5374 commit 304c1b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
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 @@ -63,8 +62,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 @@ -42,8 +41,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

0 comments on commit 304c1b9

Please sign in to comment.