]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts: Fixed searching for HEADER "" with lib-fts
authorTimo Sirainen <tss@iki.fi>
Tue, 8 Dec 2015 11:28:01 +0000 (13:28 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 9 Dec 2015 16:51:53 +0000 (18:51 +0200)
src/plugins/fts/fts-search-args.c

index ef817292dd30e41a3824e2f2e2a282dea8d3f830..17bb214ad7b4ad249ca89a604e04f13d53a93dbd 100644 (file)
@@ -192,6 +192,11 @@ fts_search_args_expand_tree(struct fts_backend *backend, pool_t pool,
                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 {