Files
52b7625bdf fix(api): encode non-ASCII filenames in S3 Content-Disposition (#9634)
* fix(api): encode non-ASCII filenames in S3 Content-Disposition

Multipart S3 uploads stored Content-Disposition as
`inline; filename="<raw name>"`. For a non-ASCII file name (e.g. a Chinese
name) the stored header is not valid ASCII, so on download the object store
fails to read the attribute back (`HeaderValue::to_str`) and returns a 500:
"Content-Disposition header contained non UTF-8 characters".

Encode non-ASCII names with the RFC 6266 / RFC 5987
`filename*=UTF-8''<percent-encoded>` form, which is pure ASCII and is decoded
back to the original name by clients. ASCII names are unchanged.

Addresses #7456

* fix: send an ASCII filename fallback and escape quotes in Content-Disposition, also for HTTP route static assets

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

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 11:13:09 +01:00
..
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2026-10-23 18:49:17 -04:00
2025-09-04 22:05:22 +00:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00