From: Timo Sirainen Date: Wed, 14 Sep 2016 15:57:43 +0000 (+0300) Subject: imapc: mail_get_stream() shouldn't return cached hdr_size X-Git-Tag: 2.2.26~258 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f75889f56c6c1d52c032f3f0beaa93f724d0908d;p=thirdparty%2Fdovecot%2Fcore.git imapc: mail_get_stream() shouldn't return cached hdr_size --- 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) {