diff options
| author | Vincent Richard <[email protected]> | 2013-06-27 11:56:55 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2013-06-27 11:56:55 +0000 |
| commit | 86f0a63802d1bb6b2b13b8497a59f7af3a84ed9d (patch) | |
| tree | 61ac5152b100118e8a5f0fdf63f08d5c35e5b305 /src/streamContentHandler.cpp | |
| parent | Removed debug printf. (diff) | |
| download | vmime-86f0a63802d1bb6b2b13b8497a59f7af3a84ed9d.tar.gz vmime-86f0a63802d1bb6b2b13b8497a59f7af3a84ed9d.zip | |
Do not QP-encode CRLFs when content type is text.
Diffstat (limited to 'src/streamContentHandler.cpp')
| -rw-r--r-- | src/streamContentHandler.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/streamContentHandler.cpp b/src/streamContentHandler.cpp index 711ac4dc..d6444833 100644 --- a/src/streamContentHandler.cpp +++ b/src/streamContentHandler.cpp @@ -52,7 +52,7 @@ streamContentHandler::~streamContentHandler() streamContentHandler::streamContentHandler(const streamContentHandler& cts) - : contentHandler(), m_encoding(cts.m_encoding), + : contentHandler(), m_encoding(cts.m_encoding), m_contentType(cts.m_contentType), m_stream(cts.m_stream), m_length(cts.m_length) { } @@ -66,6 +66,7 @@ ref <contentHandler> streamContentHandler::clone() const streamContentHandler& streamContentHandler::operator=(const streamContentHandler& cts) { + m_contentType = cts.m_contentType; m_encoding = cts.m_encoding; m_stream = cts.m_stream; @@ -103,6 +104,7 @@ void streamContentHandler::generate(utility::outputStream& os, const vmime::enco ref <utility::encoder::encoder> theEncoder = enc.getEncoder(); theEncoder->getProperties()["maxlinelength"] = maxLineLength; + theEncoder->getProperties()["text"] = (m_contentType.getType() == mediaTypes::TEXT); m_stream->reset(); // may not work... @@ -129,6 +131,7 @@ void streamContentHandler::generate(utility::outputStream& os, const vmime::enco { ref <utility::encoder::encoder> theEncoder = enc.getEncoder(); theEncoder->getProperties()["maxlinelength"] = maxLineLength; + theEncoder->getProperties()["text"] = (m_contentType.getType() == mediaTypes::TEXT); m_stream->reset(); // may not work... @@ -216,4 +219,16 @@ bool streamContentHandler::isBuffered() const } +void streamContentHandler::setContentTypeHint(const mediaType& type) +{ + m_contentType = type; +} + + +const mediaType streamContentHandler::getContentTypeHint() const +{ + return m_contentType; +} + + } // vmime |
