Skip to content

Encode Content-Type and Content-Disposition parameters using RFC 2231 parameter encoding#52

Open
Aloisius wants to merge 2 commits intostalwartlabs:mainfrom
tryem:main
Open

Encode Content-Type and Content-Disposition parameters using RFC 2231 parameter encoding#52
Aloisius wants to merge 2 commits intostalwartlabs:mainfrom
tryem:main

Conversation

@Aloisius
Copy link

@Aloisius Aloisius commented Oct 29, 2025

Currently, mail-builder encodes Content-Type and Content-Disposition parameter values using RFC 2047 encoding. This is meant for email headers using the 'text', 'comment' and 'word' tokens (as defined by RFC 822). Content-Type and Content-Disposition parameter values do not use any of those tokens.

This modifies mail-builder to encode parameters using RFC 2231 encoding instead. It will attempt use simple quoted string values when possible, or fall back to utf-8 extended encoding if not.

This also resolves #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long filenames for attachments don't get properly wrapped, exceeding allowed limits from RFCs

1 participant