dovecot-2.2: lib-storage: mail_get_header_stream() now always re...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Aug 12 02:26:24 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/2ec8bb1396d1
changeset: 14870:2ec8bb1396d1
user: Timo Sirainen <tss at iki.fi>
date: Sun Aug 12 02:26:12 2012 +0300
description:
lib-storage: mail_get_header_stream() now always returns end-of-headers LF.
diffstat:
src/lib-storage/index/index-mail-headers.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r f329d7e1dad7 -r 2ec8bb1396d1 src/lib-storage/index/index-mail-headers.c
--- a/src/lib-storage/index/index-mail-headers.c Sun Aug 12 02:24:54 2012 +0300
+++ b/src/lib-storage/index/index-mail-headers.c Sun Aug 12 02:26:12 2012 +0300
@@ -782,11 +782,8 @@
static void
header_cache_callback(struct header_filter_istream *input ATTR_UNUSED,
struct message_header_line *hdr,
- bool *matched, struct index_mail *mail)
+ bool *matched ATTR_UNUSED, struct index_mail *mail)
{
- if (hdr != NULL && hdr->eoh)
- *matched = FALSE;
-
index_mail_parse_header(NULL, hdr, mail);
}
@@ -810,6 +807,7 @@
if (mail_cache_lookup_headers(_mail->transaction->cache_view, dest,
_mail->seq, headers->idx,
headers->count) > 0) {
+ str_append(dest, "\n");
_mail->transaction->stats.cache_hit_count++;
if (mail->data.filter_stream != NULL)
i_stream_destroy(&mail->data.filter_stream);
@@ -832,6 +830,7 @@
mail->data.filter_stream =
i_stream_create_header_filter(mail->data.stream,
HEADER_FILTER_INCLUDE |
+ HEADER_FILTER_ADD_MISSING_EOH |
HEADER_FILTER_HIDE_BODY,
headers->name, headers->count,
header_cache_callback, mail);
More information about the dovecot-cvs
mailing list