Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mime: duplicate parameter name error #129

Open
iceking2nd opened this issue Feb 13, 2025 · 1 comment
Open

mime: duplicate parameter name error #129

iceking2nd opened this issue Feb 13, 2025 · 1 comment
Assignees

Comments

@iceking2nd
Copy link

I received an email. The Content-Type section contains two charset fields, but the contents of the two charset fields only differ in case. When parsing the email, the following error was reported.
letters.EmailParser.Parse: cannot parse part "multipart/mixed" with boundary "33cef21196996d27cfa60191f95633db16e292796ab85c9c48e957fb63e7": letters.parsers.parsePart: cannot parse Content-Type: letters.parsers.parseContentTypeHeader: cannot parse Content-Type "text/html; charset=utf-8; charset=UTF-8": letters.parsers.parseDefaultMediaType: cannot parse Content-Type "text/html; charset=utf-8; charset=UTF-8": mime: duplicate parameter name
Any ideas?

@mnako mnako self-assigned this Feb 21, 2025
@mnako
Copy link
Owner

mnako commented Feb 21, 2025

Thank you for opening the issue, @iceking2nd.

I believe that the best way to handle this and other similar edge cases will be offered in #134. Once the discussion and review there is finished, I will come back to this issue and add an example of how a custom parser can be used to solve this.

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

No branches or pull requests

2 participants