Commit 3dba346f authored by Tomi Leppänen's avatar Tomi Leppänen

Merge branch 'jb12571_fix_attaching_eml' into 'master'

[qmf] Use EightBit for text and email files. Contributes to JB#12571

See merge request !34
parents 339c1fb0 152e45b7
From 6648e72b7db42dac51468c5225d89b2691019572 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomi=20Lepp=C3=A4nen?= <tomi.leppanen@jolla.com>
Date: Mon, 30 Sep 2019 14:11:57 +0300
Subject: [PATCH] Use EightBit encoding instead of Base64 for text types
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously attachments with text/* or message/rfc822 encoding were
base64 encoded for no good reason. Change them to use EightBit transfer
encoding.
Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
---
src/libraries/qmfclient/qmailmessage.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/libraries/qmfclient/qmailmessage.cpp b/src/libraries/qmfclient/qmailmessage.cpp
index 71491f1a..d7678678 100644
--- a/src/libraries/qmfclient/qmailmessage.cpp
+++ b/src/libraries/qmfclient/qmailmessage.cpp
@@ -1579,7 +1579,11 @@ namespace attachments
disposition.setParameter("filename*", QMailMessageContentDisposition::encodeParameter(input, "UTF-8"));
}
- container->appendPart(QMailMessagePart::fromFile(filePath, disposition,attach_type, QMailMessageBody::Base64,
+ QMailMessageBody::TransferEncoding te(QMailMessageBody::Base64);
+ if (attach_type.matches("text") || attach_type.matches("message", "rfc822"))
+ te = QMailMessageBody::EightBit;
+
+ container->appendPart(QMailMessagePart::fromFile(filePath, disposition, attach_type, te,
QMailMessageBody::RequiresEncoding));
addedSome = true;
}
--
2.21.0
......@@ -46,6 +46,7 @@ Patch15: 0015-Check-if-IDLE-connection-needs-to-be-established-aft.patch
Patch16: 0016-Revert-Fix-bundled-zlib-detection.patch
Patch17: 0017-Add-signature-settings-in-account.patch
Patch18: 0018-Use-socket-s-local-address-for-HELO-and-EHLO-message.patch
Patch19: 0019-Use-EightBit-encoding-instead-of-Base64-for-text-typ.patch
%description
The Qt Messaging Framework, QMF, consists of a C++ library and daemon server
......@@ -169,6 +170,7 @@ This package contains the tests for Qt Messaging Framework (QMF).
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment