aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2006-01-19 19:58:37 +0000
committerVincent Richard <[email protected]>2006-01-19 19:58:37 +0000
commit1b7a7a76941a27acc7d68cd3674c12b6a6c3f038 (patch)
treece0811a28dbaf09b77fd608946e95635290d71d1
parentAdded support for attachments of type 'message/rfc822'. (diff)
downloadvmime-1b7a7a76941a27acc7d68cd3674c12b6a6c3f038.tar.gz
vmime-1b7a7a76941a27acc7d68cd3674c12b6a6c3f038.zip
Treat 'inline' parts without Content-[Id/Location] as attachments.
-rw-r--r--src/attachmentHelper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/attachmentHelper.cpp b/src/attachmentHelper.cpp
index c1a1f057..0a780711 100644
--- a/src/attachmentHelper.cpp
+++ b/src/attachmentHelper.cpp
@@ -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&)
{