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

[Bug] - REST responses return empty tags #850

Closed
lrm25 opened this issue Sep 27, 2024 · 1 comment
Closed

[Bug] - REST responses return empty tags #850

lrm25 opened this issue Sep 27, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lrm25
Copy link
Contributor

lrm25 commented Sep 27, 2024

Describe the bug
REST responses directly from s3 do not return empty tags, but REST responses from versitygw do. While not a serious issue, optional XML tags that aren't set shouldn't be returned.

For example, versitygw returns this when there is no object lock config rule:

<?xml version="1.0" encoding="UTF-8"?>
<ObjectLockConfiguration><ObjectLockEnabled>Enabled</ObjectLockEnabled><Rule></Rule></ObjectLockConfiguration>

s3 returns this:

<?xml version="1.0" encoding="UTF-8"?>
<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><ObjectLockEnabled>Enabled</ObjectLockEnabled></ObjectLockConfiguration>

Since Rule is an optional parameter and isn't set.

To Reproduce

  1. Send a "GET" rest command, e.g. versioning: https://github.com/versity/versitygw/blob/test_cmdline_rest_retention/tests/rest_scripts/get_bucket_versioning.sh
  2. Send for both direct (s3.amazonaws.com) and versitygw.
  3. Compare the two. Note the empty tags after sending to versitygw.

Expected behavior
versitygw doesn't return unnecessary optional XML tags.

Server Version
Version : v1.0.7
Build : b7291c3
BuildTime: 2024-09-25_08:28:23PM
Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64

@lrm25 lrm25 added the bug Something isn't working label Sep 27, 2024
@mlt180 mlt180 self-assigned this Oct 1, 2024
@mlt180
Copy link
Contributor

mlt180 commented Oct 3, 2024

This issue has been fixed in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants