dovecot-2.2: imapc: Fixes to imapc_feature fetch-headers
dovecot at dovecot.org
dovecot at dovecot.org
Sun Nov 17 00:41:35 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/be0e619a018b
changeset: 16966:be0e619a018b
user: Timo Sirainen <tss at iki.fi>
date: Sun Nov 17 00:41:23 2013 +0200
description:
imapc: Fixes to imapc_feature fetch-headers
diffstat:
src/lib-storage/index/imapc/imapc-mail-fetch.c | 2 +-
src/lib-storage/index/imapc/imapc-mail.c | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 94a467b0cb34 -r be0e619a018b src/lib-storage/index/imapc/imapc-mail-fetch.c
--- a/src/lib-storage/index/imapc/imapc-mail-fetch.c Sat Nov 16 21:58:31 2013 +0200
+++ b/src/lib-storage/index/imapc/imapc-mail-fetch.c Sun Nov 17 00:41:23 2013 +0200
@@ -156,7 +156,7 @@
str_append(str, "BODY.PEEK[HEADER] ");
else if (headers != NULL) {
mail->fetching_headers =
- headers_merge(mail->imail.mail.pool, headers,
+ headers_merge(mail->imail.mail.data_pool, headers,
mail->fetching_headers);
str_append(str, "BODY.PEEK[HEADER.FIELDS (");
for (i = 0; mail->fetching_headers[i] != NULL; i++) {
diff -r 94a467b0cb34 -r be0e619a018b src/lib-storage/index/imapc/imapc-mail.c
--- a/src/lib-storage/index/imapc/imapc-mail.c Sat Nov 16 21:58:31 2013 +0200
+++ b/src/lib-storage/index/imapc/imapc-mail.c Sun Nov 17 00:41:23 2013 +0200
@@ -308,13 +308,15 @@
data->access_part |= READ_HDR | READ_BODY;
}
- if (data->access_part == 0 && data->wanted_headers != NULL) {
+ if (data->access_part == 0 && data->wanted_headers != NULL &&
+ !IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_FETCH_HEADERS)) {
/* see if all wanted headers exist in cache */
if (!imapc_mail_has_headers_in_cache(mail, data->wanted_headers))
data->access_part |= PARSE_HDR;
}
if (data->access_part == 0 &&
- (data->wanted_fields & MAIL_FETCH_IMAP_ENVELOPE) != 0) {
+ (data->wanted_fields & MAIL_FETCH_IMAP_ENVELOPE) != 0 &&
+ !IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_FETCH_HEADERS)) {
/* the common code already checked this partially,
but we need a guaranteed correct answer */
header_ctx = mailbox_header_lookup_init(_mail->box,
@@ -360,6 +362,7 @@
index_mail_close(_mail);
+ mail->fetching_headers = NULL;
if (mail->body_fetched) {
imapc_mail_cache_free(cache);
cache->uid = _mail->uid;
More information about the dovecot-cvs
mailing list