diff --git a/src/S3/S3Client.php b/src/S3/S3Client.php index 235bac3b4c..168a85898d 100644 --- a/src/S3/S3Client.php +++ b/src/S3/S3Client.php @@ -640,7 +640,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';