Fixed attachment detection with non-MIME message (thanks to Peter Libic).
This commit is contained in:
parent
f95b91c547
commit
3263ad2760
@ -72,6 +72,12 @@ const bool attachmentHelper::isBodyPartAnAttachment(ref <const bodyPart> part)
|
||||
}
|
||||
catch (exceptions::no_such_field&)
|
||||
{
|
||||
// If this is the root part and no Content-Type field is present,
|
||||
// then this may not be a MIME message, so do not assume it is
|
||||
// an attachment
|
||||
if (part->getParentPart() == NULL)
|
||||
return false;
|
||||
|
||||
// No "Content-type" field: assume "application/octet-stream".
|
||||
type = mediaType(mediaTypes::APPLICATION,
|
||||
mediaTypes::APPLICATION_OCTET_STREAM);
|
||||
|
Loading…
Reference in New Issue
Block a user