Mercurial > dovecot > core-2.2
changeset 22898:68e071667d10
imapc: Update mail size also when istream_opened() hook is called
When fetching a message body the cached message size was set. However,
if istream_opened() hook was used this wasn't done. If a client had
fetched both (RFC822.SIZE BODY.PEEK[]) and the server sent a wrong
RFC822.SIZE, that size was used for the message body size, which resulted
in "Cached message size larger than expected" errors.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 15 Mar 2018 12:20:14 +0200 |
parents | fecb535a39de |
children | 093ef44c44e6 |
files | src/lib-storage/index/imapc/imapc-mail-fetch.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-mail-fetch.c Tue Mar 06 15:15:01 2018 +0200 +++ b/src/lib-storage/index/imapc/imapc-mail-fetch.c Thu Mar 15 12:20:14 2018 +0200 @@ -584,7 +584,8 @@ index_mail_close_streams(imail); return; } - } else if (mail->body_fetched) { + } + if (mail->body_fetched) { ret = i_stream_get_size(imail->data.stream, TRUE, &size); if (ret < 0) { index_mail_close_streams(imail);