Honor EncodingType in response with ListObjectsV2 as with ListObjects#2918
Open
nanawel wants to merge 3 commits intoaws:masterfrom
Open
Honor EncodingType in response with ListObjectsV2 as with ListObjects#2918nanawel wants to merge 3 commits intoaws:masterfrom
nanawel wants to merge 3 commits intoaws:masterfrom
Conversation
stobrien89
requested changes
Jul 25, 2025
| return function (Command $command, $request = null) use ($handler) { | ||
| $autoSet = false; | ||
| if ($command->getName() === 'ListObjects' | ||
| if (strpos($command->getName(), 'ListObjects') === 0 |
Member
There was a problem hiding this comment.
Can we change this to a str_starts_with()?
Member
There was a problem hiding this comment.
Could you either turn this test into a parameterized test which call both listObjects and listObjectsV2 or create a separate unit test for listObjectsV2?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There seems to be a bug with
ListObjectsV2when dealing with type encoding in responses. The special middleware that's responsible for url-decoding the values in some nodes can only be triggered withListObjects, so in V2 the client ends up with URL-encoded strings that are not valid in the rest of the application.aws-sdk-php/src/S3/S3Client.php
Lines 642 to 652 in 0de11ad
This patch should fix this issue while keeping compatibility with PHP 7.