]> 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>
Thu, 15 Sep 2016 06:01:03 +0000 (09:01 +0300)
src/lib-storage/index/imapc/imapc-mail.c

index dba2de550ecb10f13208fcdbcd9aad9ba1d798af..5d4d18cae8b7be6dca37aeec29b094eee99ced51 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) {