Skip to content

Commit

Permalink
Merge pull request #34756 from nextcloud/revert-33087-fix/30282/exter…
Browse files Browse the repository at this point in the history
…nal-storages

Revert "fix external storages access"
  • Loading branch information
szaimen authored Oct 24, 2022
2 parents 855be71 + 11108e8 commit 7835223
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/private/Http/Client/ClientService.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

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

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 @@ -41,7 +42,8 @@ public function testNewClient(): void {
$localAddressChecker
);

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

Expand Down

0 comments on commit 7835223

Please sign in to comment.