Files
seaweedfs/weed/s3api
Chris LuandClaude Opus 5.5 18ba10b535 s3api: answer KeyTooLongError when the filer refuses an object's name (#13349)
* s3api: answer KeyTooLongError when the routed PUT's name is refused

The filer checks an entry's name length before its first mutation stores
anything, so a routed PUT refused with ENTRY_NAME_TOO_LONG on mutation 0
is a definite refusal, not an ambiguous outcome. Treating it as ambiguous
sent a zero-byte PUT, which has no chunks to verify, to 503.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: test a routed PUT refused for its name length

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: keep the filer's error code when a routed mkfile is refused

routedMkFile flattened the transaction's error into a string, so callers
could not tell a refused name from an internal failure, and a CopyObject to
a name the filer refuses answered 500. Wrap the code's sentinel, as
CreateEntry does, so the existing error mapping answers KeyTooLongError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: test a routed mkfile keeps the filer's error code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: answer KeyTooLongError when a multipart completion's name is refused

Completing an upload whose last key segment the filer refuses answered
500 InternalError. The refused create stores nothing, so answer
KeyTooLongError as PutObject does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 11:00:33 -08:00
..
2024-07-04 11:00:41 -07:00

see https://blog.aqwari.net/xml-schema-go/

1. go get aqwari.net/xml/cmd/xsdgen
2. Add EncodingType element for ListBucketResult in AmazonS3.xsd
3. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd
4. Remove empty Grantee struct in s3api_xsd_generated.go
5. Remove xmlns: sed s'/http:\/\/s3.amazonaws.com\/doc\/2006-03-01\/\ //' s3api_xsd_generated.go