mirror of
https://github.com/versity/versitygw.git
synced 2026-08-22 07:06:19 +00:00
The AWS SDK serializes all non-nil pointer fields into query parameters. Previously, ContinuationToken and Prefix were always passed as non-nil pointers (even when empty), and MaxBuckets was always forwarded with its default value of 10000. This produced a request like: GET /?continuation-token=&max-buckets=10000&prefix= Some servers implement the original S3 v1 ListBuckets API which accepts no query parameters, causing it to return 400 InvalidArgument. Fix by only setting ContinuationToken and Prefix on the downstream SDK input when they are non-empty, and applying MaxBuckets pagination client-side (consistent with the posix and azure backends) rather than forwarding it to the upstream endpoint.