Merge pull request #60167 from nextcloud/enh/noid/allow-http-progressive-stream-response

failing tests not related according to Julien
pull/60740/merge
Daphne Muller 3 months ago committed by GitHub
commit faa78c8a6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      lib/private/Http/Client/ClientService.php
  2. 4
      lib/public/Http/Client/IClientService.php

@ -41,9 +41,9 @@ class ClientService implements IClientService {
}
#[\Override]
public function newClient(): IClient {
$handler = new CurlHandler();
$stack = HandlerStack::create($handler);
public function newClient(?callable $handler = null): IClient {
$clientHandler = $handler ?? new CurlHandler();
$stack = HandlerStack::create($clientHandler);
if ($this->config->getSystemValueBool('dns_pinning', true)) {
$stack->push($this->dnsPinMiddleware->addDnsPinning());
}

@ -16,8 +16,10 @@ namespace OCP\Http\Client;
*/
interface IClientService {
/**
* @param ?callable $handler Handler that overrides the default CurlHandler
* @return IClient
* @since 8.1.0
* @since 35.0.0 Added $handler optional param
*/
public function newClient(): IClient;
public function newClient(?callable $handler = null): IClient;
}

Loading…
Cancel
Save