Skip to content

HDDS-16004. Return NotImplemented for GetObjectTorrent instead of GetObject body - #10899

Open
shuan1026 wants to merge 1 commit into
apache:masterfrom
shuan1026:HDDS-16004
Open

HDDS-16004. Return NotImplemented for GetObjectTorrent instead of GetObject body#10899
shuan1026 wants to merge 1 commit into
apache:masterfrom
shuan1026:HDDS-16004

Conversation

@shuan1026

@shuan1026 shuan1026 commented Jul 29, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

Ozone S3G does not support GetObjectTorrent (GET ...?torrent). Currently the request falls through to GetObject and returns 200 OK with the raw object bytes, which misleads clients and fails ceph s3-tests test_get_object_torrent (assert data != _get_body(response) when the body matches the uploaded payload).

This PR mirrors BucketGetLocationHandler: register ObjectGetTorrentHandler first on the object GET chain, detect ?torrent, and return 501 NotImplemented before GetObject runs. BitTorrent/bencode generation is out of scope.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16004

How was this patch tested?

  • mvn -pl :ozone-s3gateway test -Dtest=TestObjectGetTorrent,TestObjectGet
  • ozone-s3gateway test module (701 tests, no regressions)
  • checkstyle.sh (0 violations)

@shuan1026

Copy link
Copy Markdown
Author

PTAL @chungen0126 Thank you!

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the patch! @shuan1026 LGTM +1.

@adoroszlai adoroszlai added the s3 S3 Gateway label Aug 1, 2026

@chungen0126 chungen0126 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @shuan1026 for working on this. Please also add test to AbstractS3SDKV1Tests and AbstractS3SDKV2Tests.

@Gargi-jais11

Copy link
Copy Markdown
Contributor

Thanks @shuan1026 for working on this. Please also add test to AbstractS3SDKV1Tests and AbstractS3SDKV2Tests.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s3 S3 Gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants