Mercurial > dovecot > original-hg > dovecot-2.1
changeset 14915:b0e68c53771e
fts: Don't send binary MIME parts to backend through UTF8 text conversion.
Based on patch by Mike Abbott / Apple.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 22 Feb 2013 10:17:14 +0200 |
parents | b91e1b94af21 |
children | 6d45b9bd1cff |
files | src/plugins/fts/fts-build-mail.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/fts/fts-build-mail.c Fri Feb 22 10:01:06 2013 +0200 +++ b/src/plugins/fts/fts-build-mail.c Fri Feb 22 10:17:14 2013 +0200 @@ -170,6 +170,7 @@ strncmp(content_type, "message/", 8) == 0) { /* text body parts */ key.type = FTS_BACKEND_BUILD_KEY_BODY_PART; + ctx->body_parser = fts_parser_text_init(); } else { /* possibly binary */ if ((ctx->update_ctx->backend->flags & @@ -178,8 +179,6 @@ *binary_body_r = TRUE; key.type = FTS_BACKEND_BUILD_KEY_BODY_PART_BINARY; } - if (ctx->body_parser == NULL) - ctx->body_parser = fts_parser_text_init(); key.body_content_type = content_type; key.body_content_disposition = ctx->content_disposition; return fts_backend_update_set_build_key(ctx->update_ctx, &key);