From 2908f47c9ab152d8249c26cea7fa369a64bace09 Mon Sep 17 00:00:00 2001 From: nanawel Date: Thu, 9 May 2024 17:46:13 +0200 Subject: [PATCH] Honor EncodingType in response with ListObjectsV2 as with ListObjects --- src/S3/S3Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/S3/S3Client.php b/src/S3/S3Client.php index 88de7473f7..0049fb6c2d 100644 --- a/src/S3/S3Client.php +++ b/src/S3/S3Client.php @@ -644,7 +644,7 @@ private function getEncodingTypeMiddleware() return static function (callable $handler) { return function (Command $command, $request = null) use ($handler) { $autoSet = false; - if ($command->getName() === 'ListObjects' + if (strpos($command->getName(), 'ListObjects') === 0 && empty($command['EncodingType']) ) { $command['EncodingType'] = 'url';