aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/google-ced
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-12-23 18:24:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-12-23 18:24:18 +0000
commit4b611bcf5af9d22e24b1842e0ae62fc661955921 (patch)
tree03f34439ad42994d3f8fa27076189b2dd7741db2 /contrib/google-ced
parent75d5d020bce87534c3f802e20bbf0bca465705d2 (diff)
downloadrspamd-4b611bcf5af9d22e24b1842e0ae62fc661955921.tar.gz
rspamd-4b611bcf5af9d22e24b1842e0ae62fc661955921.zip
[Fix] Return MimeCharset as we work with emails...
Diffstat (limited to 'contrib/google-ced')
-rw-r--r--contrib/google-ced/ced_c.cc2
-rw-r--r--contrib/google-ced/ced_c.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/contrib/google-ced/ced_c.cc b/contrib/google-ced/ced_c.cc
index d8f70a87e..51671218b 100644
--- a/contrib/google-ced/ced_c.cc
+++ b/contrib/google-ced/ced_c.cc
@@ -18,7 +18,7 @@ const char* ced_encoding_detect(const char* text, int text_length,
ct, ignore_7bit_mail_encodings, bytes_consumed, is_reliable);
if (IsValidEncoding(enc)) {
- return EncodingName(enc);
+ return MimeEncodingName(enc);
}
return nullptr;
diff --git a/contrib/google-ced/ced_c.h b/contrib/google-ced/ced_c.h
index c8cb16a2a..c086f0ca1 100644
--- a/contrib/google-ced/ced_c.h
+++ b/contrib/google-ced/ced_c.h
@@ -14,6 +14,9 @@ enum CedTextCorpusType {
CED_NUM_CORPA,
};
+/*
+ * XXX: Rspamd addition: it actually returns Mime format of the encoding
+ */
const char *ced_encoding_detect (const char *text, int text_length,
const char *url_hint,
const char *http_charset_hint,