[evolution-data-server] I#361 - Camel: Understand non-standard "Content-Transfer-Encoding: uuencode"
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] I#361 - Camel: Understand non-standard "Content-Transfer-Encoding: uuencode"
- Date: Thu, 30 Sep 2021 15:05:58 +0000 (UTC)
commit 882ebf6d101fbe4c1b51272e302732c5ab88d881
Author: Milan Crha <mcrha redhat com>
Date: Thu Sep 30 17:04:28 2021 +0200
I#361 - Camel: Understand non-standard "Content-Transfer-Encoding: uuencode"
The expected encoding name is "x-uuencode", but some clients generate
the value as "uuencode", thus count with it too.
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/361
src/camel/camel-folder-summary.c | 3 ++-
src/camel/camel-mime-utils.c | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/camel/camel-folder-summary.c b/src/camel/camel-folder-summary.c
index 8cb6dba9f..709fa23e8 100644
--- a/src/camel/camel-folder-summary.c
+++ b/src/camel/camel-folder-summary.c
@@ -3139,7 +3139,8 @@ summary_traverse_content_with_parser (CamelFolderSummary *summary,
else
camel_mime_filter_reset (summary->priv->filter_qp);
enc_id = camel_mime_parser_filter_add (mp, summary->priv->filter_qp);
- } else if (!g_ascii_strcasecmp (encoding, "x-uuencode")) {
+ } else if (!g_ascii_strcasecmp (encoding, "x-uuencode") ||
+ !g_ascii_strcasecmp (encoding, "uuencode")) {
d (printf (" decoding x-uuencode\n"));
if (summary->priv->filter_uu == NULL)
summary->priv->filter_uu = camel_mime_filter_basic_new
(CAMEL_MIME_FILTER_BASIC_UU_DEC);
diff --git a/src/camel/camel-mime-utils.c b/src/camel/camel-mime-utils.c
index 25a626d8e..761811bb1 100644
--- a/src/camel/camel-mime-utils.c
+++ b/src/camel/camel-mime-utils.c
@@ -3303,6 +3303,9 @@ camel_transfer_encoding_from_string (const gchar *string)
for (i = 0; i < G_N_ELEMENTS (encodings); i++)
if (!g_ascii_strcasecmp (string, encodings[i]))
return i;
+
+ if (!g_ascii_strcasecmp (string, "uuencode"))
+ return CAMEL_TRANSFER_ENCODING_UUENCODE;
}
return CAMEL_TRANSFER_ENCODING_DEFAULT;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]