Skip to content

Fix SetBucketLifecycle() to send properly formed XML#2213

Open
isimluk wants to merge 2 commits intominio:masterfrom
isimluk:fix-put-lifecycle
Open

Fix SetBucketLifecycle() to send properly formed XML#2213
isimluk wants to merge 2 commits intominio:masterfrom
isimluk:fix-put-lifecycle

Conversation

@isimluk
Copy link
Copy Markdown

@isimluk isimluk commented Mar 18, 2026

https://docs.aws.amazon.com/AmazonS3/latest/API/API_LifecycleRule.html mentions that

Filter is required if the LifecycleRule does not contain a Prefix element.

After #2177, this requirement is broken for bucket-global (=prefixless) rules. And clients setting such may run into server side validation issues like.

HTTP/1.1 400 Bad Request

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>MalformedXML</Code>
  ...
</Error>

@klauspost
Copy link
Copy Markdown
Contributor

@amigan

@isimluk isimluk force-pushed the fix-put-lifecycle branch from 383366b to bba1faa Compare March 19, 2026 15:25
isimluk added 2 commits April 21, 2026 09:06
https://docs.aws.amazon.com/AmazonS3/latest/API/API_LifecycleRule.html
mentions that

       Filter is required
       if the LifecycleRule does not contain a Prefix element.

After minio#2177, this requirement is broken for bucket-global (=prefixless)
rules. And clients setting such may run into server side validation
issues like.

HTTP/1.1 400 Bad Request

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>MalformedXML</Code>
  ...
</Error>
@isimluk isimluk force-pushed the fix-put-lifecycle branch from bba1faa to 55ca5dc Compare April 21, 2026 07:07
@isimluk
Copy link
Copy Markdown
Author

isimluk commented Apr 21, 2026

Fixed gofumpt (hopefully).

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.

2 participants