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
Do not emit filename* in multipart/form-data parts #1478
When Pekko HTTP serializes a Multipart.FormData.BodyPart with a non-ASCII filename, it uses the shared Content-Disposition renderer. That renderer emits both an ASCII fallback (with unsupported characters replaced by ?) and a filename* parameter. Both strict and streamed multipart serialization use this renderer.
This was confirmed by source inspection on main; no runtime test was run.
Expected behavior
RFC 7578 §4.2 prohibits sending filename* in multipart/form-data part headers. The multipart sender should preserve non-ASCII filenames via a compatible filename encoding rather than simply dropping filename* and keeping a lossy fallback.
Scope the change to outgoing form data. Preserve existing inbound compatibility and the extended filename behavior for ordinary HTTP attachment headers. Add strict and streamed serialization tests, including a non-ASCII filename and an attachment control.
I think this needs to be configurable.
We don't have any reports of the current code causing issues and many external services may not follow the spec exactly.
The configs options needed could be
add filename*
send just filename with non-ASCII chars replaced by ?
Activity
pjfanning commentedon Nov 16, 2026
I think this needs to be configurable.
We don't have any reports of the current code causing issues and many external services may not follow the spec exactly.
The configs options needed could be
feat: make multipart form-data filename encoding selectable (#1494)