aws / aws-sdk-php

Official repository of the AWS SDK for PHP (@awsforphp)
http://aws.amazon.com/sdkforphp
Apache License 2.0
5.99k stars 1.2k forks source link

Honor EncodingType in response with ListObjectsV2 as with ListObjects #2918

Open nanawel opened 1 month ago

nanawel commented 1 month ago

There seems to be a bug with ListObjectsV2 when dealing with type encoding in responses. The special middleware that's responsible for url-decoding the values in some nodes can only be triggered with ListObjects, so in V2 the client ends up with URL-encoded strings that are not valid in the rest of the application.

https://github.com/aws/aws-sdk-php/blob/0de11adba8f174a76346c9dbb175c2030ff5c8f2/src/S3/S3Client.php#L642-L652

This patch should fix this issue while keeping compatibility with PHP 7.