Merge pull request #253 from jacadcaps/MessageParser

Default missing Content-Type to text/plain.
This commit is contained in:
Vincent Richard 2021-03-16 21:38:34 +01:00 committed by GitHub
commit 115d232483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,7 +210,16 @@ bool messageParser::findSubTextParts(
} else {
// No "Content-type" field.
// No "Content-type" field. RFC2045 section 5.2 assumes this is TEXT/PLAIN
try {
shared_ptr <textPart> txtPart = textPartFactory::getInstance()->create(mediaType(mediaTypes::TEXT, mediaTypes::TEXT_PLAIN));
txtPart->parse(msg, part, p);
m_textParts.push_back(txtPart);
}
catch (exceptions::no_factory_available& e) {
// Content-type not recognized.
}
}
}