From f75889f56c6c1d52c032f3f0beaa93f724d0908d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 14 Sep 2016 18:57:43 +0300 Subject: [PATCH] imapc: mail_get_stream() shouldn't return cached hdr_size --- src/lib-storage/index/imapc/imapc-mail.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib-storage/index/imapc/imapc-mail.c b/src/lib-storage/index/imapc/imapc-mail.c index dba2de550e..5d4d18cae8 100644 --- a/src/lib-storage/index/imapc/imapc-mail.c +++ b/src/lib-storage/index/imapc/imapc-mail.c @@ -296,6 +296,10 @@ imapc_mail_get_stream(struct mail *_mail, bool get_body, mail->imail.data.stream != NULL) { /* we've fetched the header, but we need the body now too */ index_mail_close_streams(&mail->imail); + /* don't re-use any cached header sizes. we may be + intentionally downloading the full body because the header + wasn't returned correctly (e.g. pop3-migration does this) */ + data->hdr_size_set = FALSE; } if (data->stream == NULL) { -- 2.47.3