]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: mail_get_stream() shouldn't return cached hdr_size
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 14 Sep 2016 15:57:43 +0000 (18:57 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 14 Sep 2016 15:57:43 +0000 (18:57 +0300)
src/lib-storage/index/imapc/imapc-mail.c

index b040e2d6f53f96084a51d624391e6dd307bbe817..a39d02f039a96597240529c5aaa193656d9db1b9 100644 (file)
@@ -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) {