dovecot-2.2: imapc: Fixed fetching specific headers without imap...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 17 10:27:21 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/2fcb1d28ddbc
changeset: 17234:2fcb1d28ddbc
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 17 12:26:46 2014 +0200
description:
imapc: Fixed fetching specific headers without imapc_features=fetch-headers

diffstat:

 src/lib-storage/index/imapc/imapc-mail.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 3db2ab503759 -r 2fcb1d28ddbc src/lib-storage/index/imapc/imapc-mail.c
--- a/src/lib-storage/index/imapc/imapc-mail.c	Thu Apr 17 10:29:10 2014 +0200
+++ b/src/lib-storage/index/imapc/imapc-mail.c	Thu Apr 17 12:26:46 2014 +0200
@@ -194,6 +194,8 @@
 {
 	struct mailbox_header_lookup_ctx *headers;
 	const char *header_names[2];
+	const unsigned char *data;
+	size_t size;
 	struct istream *input;
 	int ret;
 
@@ -204,6 +206,9 @@
 	mailbox_header_lookup_unref(&headers);
 	if (ret < 0)
 		return -1;
+
+	while (i_stream_read_data(input, &data, &size, 0) > 0)
+		i_stream_skip(input, size);
 	/* the header should cached now. */
 	return index_mail_get_headers(_mail, field, decode_to_utf8, value_r);
 }


More information about the dovecot-cvs mailing list