Treat 'inline' parts without Content-[Id/Location] as attachments.

This commit is contained in:
Vincent Richard 2006-01-19 19:58:37 +00:00
parent 8e0080b0ed
commit 1b7a7a7694

View File

@ -48,6 +48,14 @@ const bool attachmentHelper::isBodyPartAnAttachment(ref <const bodyPart> part)
if (disp.getName() != contentDispositionTypes::INLINE)
return true;
// If the Content-Disposition is 'inline' and there is no
// Content-Id or Content-Location field, it is an attachment
if (!part->getHeader()->hasField(vmime::fields::CONTENT_ID) &&
!part->getHeader()->hasField(vmime::fields::CONTENT_LOCATION))
{
return true;
}
}
catch (exceptions::no_such_field&)
{