From 9e3f4090162e8019496b0c2671fc72f7fdae5595 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 14 Apr 2026 19:54:01 +0200 Subject: [PATCH] fix(Client): Make class complient with PSR standard Mark LocalServerException as a ClientExceptionInterface and ensure buildRequestOptions is called. Signed-off-by: Carl Schwan --- lib/private/Http/Client/Client.php | 2 +- lib/public/Http/Client/LocalServerException.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index 0b5391b579cb8..f1b81df396477 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -481,7 +481,7 @@ public function request(string $method, string $uri, array $options = []): IResp public function sendRequest(RequestInterface $request): ResponseInterface { $this->preventLocalAddress((string)$request->getUri(), []); - return $this->client->sendRequest($request); + return $this->client->send($request, $this->buildRequestOptions([])); } protected function wrapGuzzlePromise(PromiseInterface $promise): IPromise { diff --git a/lib/public/Http/Client/LocalServerException.php b/lib/public/Http/Client/LocalServerException.php index bb18da13a15f9..1becf3d77c9db 100644 --- a/lib/public/Http/Client/LocalServerException.php +++ b/lib/public/Http/Client/LocalServerException.php @@ -8,8 +8,10 @@ */ namespace OCP\Http\Client; +use Psr\Http\Client\ClientExceptionInterface; + /** * @since 19.0.0 */ -class LocalServerException extends \RuntimeException { +class LocalServerException extends \RuntimeException implements ClientExceptionInterface { }