-
Notifications
You must be signed in to change notification settings - Fork 100
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
Fix for certain charset duplicate params error #19
Conversation
…l mime parsing fails. - Handle misplaced ; in content-type - Handle empty name in content-type - Added a test
It seems like your new error path for missing |
@jhillyerd Nice catch, didn't know about coveralls. 👍 |
@jhillyerd Done. Please review. |
@jhillyerd mime.ParseMediaType is used in several places. I think a better fix is to create a function parseMediaType which can then call mime.ParseMediaType and then if that fails call parseBadContentType. This will cover duplicate parameters fixes across Content-Type everywhere (envelope, parts, etc.). Thoughts? I'll update this PR soon. |
Looks great, thank you! |
If charset is missing from the mime header look for it in the html meta tag
If a duplicate param is present then parsing of the entire email fails. This fix handles a misplaced ";" in content-type. It also handles empty name in content-type. I have also added a unit test for this scenario.