diff options
author | Vincent Richard <[email protected]> | 2006-01-19 19:58:37 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2006-01-19 19:58:37 +0000 |
commit | 1b7a7a76941a27acc7d68cd3674c12b6a6c3f038 (patch) | |
tree | ce0811a28dbaf09b77fd608946e95635290d71d1 | |
parent | Added support for attachments of type 'message/rfc822'. (diff) | |
download | vmime-1b7a7a76941a27acc7d68cd3674c12b6a6c3f038.tar.gz vmime-1b7a7a76941a27acc7d68cd3674c12b6a6c3f038.zip |
Treat 'inline' parts without Content-[Id/Location] as attachments.
-rw-r--r-- | src/attachmentHelper.cpp | 8 |
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&) { |