You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[S3] Treat /{bucket}/ as the bucket, as S3 does #179
With path-style addressing, S3 treats /bucket/ the same as /bucket. A trailing slash still addresses the bucket, and no object can have an empty key. Here /{bucket}/ matches neither route: /{bucket} is the bucket and /{bucket}/{*key} needs a non-empty key.
Before #175 those requests got an empty-bodied 404. With #175 they get the NotImplemented fallback:
GET /b1?list-type=2 -> 200
GET /b1/?list-type=2 -> 501 <Code>NotImplemented</Code> "GET /b1/ is not implemented"
PUT /b2/ -> 501
HEAD /b1/ -> 501
Clients and scripts that build bucket URLs with a trailing slash can't list, create or check buckets.
Proposed solution
In crates/protocol-s3/src/server.rs, route /{bucket}/ to the same handlers as /{bucket}: list_objects, create_bucket and head_bucket. Any other method keeps the NotImplemented fallback.
Acceptance criteria
GET /b1/, PUT /b2/ and HEAD /b1/ behave exactly like their counterparts without the slash, query parameters included.
A test in crates/protocol-s3/tests/http_test.rs covers each one.
Fixed in cdb3249 (#181). /{bucket}/ now routes to the same GET, PUT and HEAD handlers as /{bucket}, query parameters included. Other methods still get NotImplemented. Test added. CHANGELOG updated. This closes when #181 merges.
Activity
saworbit commentedon Nov 13, 2026
Fixed in cdb3249 (#181). /{bucket}/ now routes to the same GET, PUT and HEAD handlers as /{bucket}, query parameters included. Other methods still get NotImplemented. Test added. CHANGELOG updated. This closes when #181 merges.