rich7420 opened a new pull request, #10668:
URL: https://github.com/apache/ozone/pull/10668
## What changes were proposed in this pull request?
ListObjectsV2 has two server-side bugs around the continuation token that
make S3 SDK clients fail:
1. **Wrong response element name.** The echoed request continuation token
was serialized as
`<continueToken>` instead of AWS's `<ContinuationToken>`. botocore maps
response fields by
element name, so `response['ContinuationToken']` was never populated and
clients that read it
back hit a `KeyError`.
2. **Empty token not treated as "no token".** An empty
`ContinuationToken=''` was passed
(non-null) into `ContinueToken.decodeFromString()`, which found no
separator and threw
`InvalidArgument`. AWS treats an empty continuation token as *no token* —
return all keys,
`IsTruncated=false`, and echo `''` back.
To align with AWS S3:
- Serialize the response continuation token as `ContinuationToken`
(`ListObjectResponse`
`@XmlElement`).
- In `BucketEndpoint`, treat a null/empty `continuation-token` query param
as absent (list from
the start, keyed off the decoded token) while still echoing the request
value back.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15739
## How was this patch tested?
https://github.com/rich7420/ozone/actions/runs/28727345055
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]