Skip to content

MailMessage::read() chokes on "Content-disposition" #3650

@lewandowski-a-j-gmail-com

Description

I noticed that Net::MailMessage::read(std::istream&) is unable to parse a multipart message that contains
"Content-disposition:" section (as oposed to "Content-Disposition:" which is parsed correctly).

I'm not an expert on email-related RFCs, but

  1. one of the email web-clients that I use did send a message with the problematic capitalization
  2. this message was parsed correctly by two different webmail clients that I use (including Google's one)
  3. MailMessage::read() does not seem have problems when I change "Content-Type:" to "Content-type:"

A small example illustraitng the problem is in the attachment. To see the unexpected [incorrect?] behavior, simply
change "Content-Disposition:" to "Content-disposition:" in the raw_message string literal at the beggining of main().
The resulting new raw message string (obtained through Net::MailMessage::write()) does not have the section with "Content-disposition:" at all.

poco-email-parser_cpp.txt

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions