dovecot-2.2: fts: Fixed searching for HEADER "" with lib-fts

dovecot at dovecot.org dovecot at dovecot.org
Tue Dec 8 11:31:27 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/8f04a0ce1c76
changeset: 19492:8f04a0ce1c76
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 08 13:28:01 2015 +0200
description:
fts: Fixed searching for HEADER "" with lib-fts

diffstat:

 src/plugins/fts/fts-search-args.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r c75cb045e83f -r 8f04a0ce1c76 src/plugins/fts/fts-search-args.c
--- a/src/plugins/fts/fts-search-args.c	Tue Dec 08 13:23:19 2015 +0200
+++ b/src/plugins/fts/fts-search-args.c	Tue Dec 08 13:28:01 2015 +0200
@@ -192,6 +192,11 @@
 		case SEARCH_HEADER:
 		case SEARCH_HEADER_ADDRESS:
 		case SEARCH_HEADER_COMPRESS_LWSP:
+			if ((*argp)->value.str[0] == '\0') {
+				/* we're testing for the existence of
+				   the header */
+				break;
+			}
 		case SEARCH_BODY:
 		case SEARCH_TEXT:
 			T_BEGIN {


More information about the dovecot-cvs mailing list