mat-sz / letterparser

✉️ Isomorphic e-mail parser (with MIME support) written in TypeScript.
BSD 3-Clause Clear License
34 stars 4 forks source link

Error when parsing strange Content-Type header #17

Closed NyaMisty closed 2 months ago

NyaMisty commented 2 months ago

letterparser currently cannot parse this Content-Type:

Content-Type: text/plain; charset = "utf-8"

This Content-Type is found in email sent by QQ Mail SMTP server (but don't know how to trigger that exactly)

I checked the code and after const parameterSplit = parameter.split('=');, letterparser trimed the header name, but didn't trim the header value, causing the fail

mat-sz commented 2 months ago

@NyaMisty

Hello, thank you for your bug report. The issue has been resolved in version 0.1.6 (published now to npm).

NyaMisty commented 2 months ago

Thanks so much for the fast fix!