Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send single DELETE requests if object name has xml invalid chars #1378

Merged
merged 4 commits into from Aug 28, 2020

Conversation

vadmeste
Copy link
Member

Currently, it is not possible to remove some objects using the multi
delete API if those objects contain some weird characters.

In an XML document, some characters are not allowed to be there and
there is no way to escape them in XML 1.0, currently used by S3.
Therefore, some objects that have those invalid characters won't be
deleted in a multi-delete request.

To solve this, we need to check for object names and send individual
DELETE requests. The object name will be encoded in the request URL and
can be removed as expected

Currently, it is not possible to remove some objects using the multi
delete API if those objects contain some weird characters.

In an XML document, some characters are not allowed to be there and
there is no way to escape them in XML 1.0, currently used by S3.
Therefore, some objects that have those invalid characters won't be
deleted in a multi-delete request.

To solve this, we need to check for object names and send individual
DELETE requests. The object name will be encoded in the request URL and
can be removed as expected
Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

Nice! Just a few cosmetics.

api-remove.go Outdated Show resolved Hide resolved
api-remove.go Outdated Show resolved Hide resolved
vadmeste and others added 3 commits August 28, 2020 13:44
Co-authored-by: Klaus Post <klauspost@gmail.com>
Co-authored-by: Klaus Post <klauspost@gmail.com>
Copy link
Collaborator

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

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

LGTM

@harshavardhana harshavardhana merged commit d9070d4 into minio:master Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants