Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/S3/S3Client.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you either turn this test into a parameterized test which call both listObjects and listObjectsV2 or create a separate unit test for listObjectsV2?

Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to a str_starts_with()?

&& empty($command['EncodingType'])
) {
$command['EncodingType'] = 'url';
Expand Down