Skip to content

HDDS-15958. Return InvalidURI for unreadable S3 object keys on GetObject#10860

Open
Gargi-jais11 wants to merge 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-15958
Open

HDDS-15958. Return InvalidURI for unreadable S3 object keys on GetObject#10860
Gargi-jais11 wants to merge 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-15958

Conversation

@Gargi-jais11

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

S3 Gateway returns 404 NoSuchKey for GetObject requests with unreadable/invalid object keys, instead of 400 InvalidURI as AWS S3 does.

Ozone already defines the correct error in S3ErrorTable.INVALID_URI but never uses it:
INVALID_URI("InvalidURI", "Couldn't parse the specified URI.", HTTP_BAD_REQUEST)

The key \xae\x8a- contains non-printable high bytes (\x80–\xff) that Ozone cannot store and that AWS treats as an invalid URI. S3G should reject it before OM lookup.

What is the link to the Apache JIRA

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

How was this patch tested?

Add Unit and Integration Tests.

@Gargi-jais11 Gargi-jais11 added the s3 S3 Gateway label Jul 24, 2026
@Gargi-jais11
Gargi-jais11 marked this pull request as ready for review July 24, 2026 09:09
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.

1 participant