Unable to delete Object in empty dir with s3.DeleteObject #1853
Labels
documentation
This is a problem with documentation.
guidance
Question that needs advice or information.
Solution
Set the aws.Config.DisableRestProtocolURICleaning member to true, to use adjacent slashes, trailing slashes, or dot slash(
./
) in key names.Version of AWS SDK for Go?
Version of Go (
go version
)?What issue did you see?
It is not possible to delete an Object in an "empty dir" with
s3.DeleteObject
, since the SDK converts//
to/
in the request path.Steps to reproduce
aws s3 cp holidays s3://aws-empty-object-test/foo//bar/holidays
aws s3 ls s3://aws-empty-object-test/foo//bar/
../bug-test foo//bar/holidays
(see example below).Note that the path is
/aws-empty-object-test/foo/bar/holidays
instead of/aws-empty-object-test/foo//bar/holidays
.aws s3 ls s3://aws-empty-object-test/foo//bar/
.Verification of the example code
aws s3 cp holidays s3://aws-empty-object-test/blub/holidays
aws s3 ls s3://aws-empty-object-test/blub/
../bug-test blub/holidays
(see example below).aws s3 ls s3://aws-empty-object-test/blub/
.Example Code
The text was updated successfully, but these errors were encountered: