]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap-storage: Don't double-filter HEADER.FIELDS (..) headers.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 18 May 2016 11:27:03 +0000 (14:27 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 18 May 2016 16:56:33 +0000 (19:56 +0300)
src/lib-imap-storage/imap-msgpart.c

index d109793e81d05d8c2153d8c87cd07a9597671189..82fc35f6f8630b12ce63458ea4878deded2d3239 100644 (file)
@@ -377,12 +377,10 @@ imap_msgpart_get_partial_header(struct mail *mail, struct istream *mail_input,
        bool has_nuls;
 
        if (msgpart->fetch_type == FETCH_HEADER_FIELDS) {
-               input = i_stream_create_header_filter(mail_input,
-                                                     HEADER_FILTER_INCLUDE |
-                                                     HEADER_FILTER_HIDE_BODY,
-                                                     hdr_fields, hdr_count,
-                                                     *null_header_filter_callback,
-                                                     (void *)NULL);
+               /* mail_get_header_stream() already filtered out the
+                  unwanted headers. */
+               input = mail_input;
+               i_stream_ref(input);
        } else {
                i_assert(msgpart->fetch_type == FETCH_HEADER_FIELDS_NOT);
                input = i_stream_create_header_filter(mail_input,