dovecot-2.2: fts: fts-parser doesn't need to be asked about all ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Mar 13 14:18:07 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/c82e9e5832a0
changeset: 18347:c82e9e5832a0
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 13 16:12:37 2015 +0200
description:
fts: fts-parser doesn't need to be asked about all the known-plaintext content-types.
diffstat:
src/plugins/fts/fts-parser.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 4f8bfc6673a3 -r c82e9e5832a0 src/plugins/fts/fts-parser.c
--- a/src/plugins/fts/fts-parser.c Fri Mar 13 16:04:10 2015 +0200
+++ b/src/plugins/fts/fts-parser.c Fri Mar 13 16:12:37 2015 +0200
@@ -12,13 +12,20 @@
&fts_parser_tika
};
+static const char *plaintext_content_types[] = {
+ "text/plain",
+ "message/delivery-status",
+ "message/disposition-notification",
+ "application/pgp-signature"
+};
+
bool fts_parser_init(struct mail_user *user,
const char *content_type, const char *content_disposition,
struct fts_parser **parser_r)
{
unsigned int i;
- if (strcmp(content_type, "text/plain") == 0) {
+ if (str_array_find(plaintext_content_types, content_type)) {
/* we probably don't want/need to allow parsers to handle
plaintext? */
return FALSE;
More information about the dovecot-cvs
mailing list