aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/imap/IMAPMessagePartContentHandler.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-06-27 11:56:55 +0000
committerVincent Richard <[email protected]>2013-06-27 11:56:55 +0000
commit86f0a63802d1bb6b2b13b8497a59f7af3a84ed9d (patch)
tree61ac5152b100118e8a5f0fdf63f08d5c35e5b305 /src/net/imap/IMAPMessagePartContentHandler.cpp
parentRemoved debug printf. (diff)
downloadvmime-86f0a63802d1bb6b2b13b8497a59f7af3a84ed9d.tar.gz
vmime-86f0a63802d1bb6b2b13b8497a59f7af3a84ed9d.zip
Do not QP-encode CRLFs when content type is text.
Diffstat (limited to 'src/net/imap/IMAPMessagePartContentHandler.cpp')
-rw-r--r--src/net/imap/IMAPMessagePartContentHandler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/imap/IMAPMessagePartContentHandler.cpp b/src/net/imap/IMAPMessagePartContentHandler.cpp
index 277ca579..c34dc076 100644
--- a/src/net/imap/IMAPMessagePartContentHandler.cpp
+++ b/src/net/imap/IMAPMessagePartContentHandler.cpp
@@ -90,6 +90,8 @@ void IMAPMessagePartContentHandler::generate
ref <utility::encoder::encoder> theEncoder = enc.getEncoder();
theEncoder->getProperties()["maxlinelength"] = maxLineLength;
+ theEncoder->getProperties()["text"] = (m_contentType.getType() == mediaTypes::TEXT);
+
theEncoder->encode(tempIn, os);
}
// No encoding to perform
@@ -110,6 +112,7 @@ void IMAPMessagePartContentHandler::generate
// Encode temporary buffer to output stream
ref <utility::encoder::encoder> theEncoder = enc.getEncoder();
theEncoder->getProperties()["maxlinelength"] = maxLineLength;
+ theEncoder->getProperties()["text"] = (m_contentType.getType() == mediaTypes::TEXT);
utility::inputStreamStringAdapter is(oss.str());
@@ -188,6 +191,18 @@ bool IMAPMessagePartContentHandler::isBuffered() const
}
+void IMAPMessagePartContentHandler::setContentTypeHint(const mediaType& type)
+{
+ m_contentType = type;
+}
+
+
+const mediaType IMAPMessagePartContentHandler::getContentTypeHint() const
+{
+ return m_contentType;
+}
+
+
} // imap
} // net
} // vmime