Skip to content

Commit

Permalink
imapc: Avoid sending FETCH BODY[HEADER] when BODY[] is already being …
Browse files Browse the repository at this point in the history
…fetched

This probably only shows up in some special situations with plugins.
  • Loading branch information
sirainen authored and villesavolainen committed Jun 16, 2017
1 parent 0856f4c commit 51937e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib-storage/index/imapc/imapc-mail-fetch.c
Expand Up @@ -275,6 +275,7 @@ imapc_mail_send_fetch(struct mail *_mail, enum mail_fetch_field fields,
full body and sometimes only the headers. */
str_append(str, "BODY.PEEK[HEADER] BODY.PEEK[TEXT] ");
}
fields |= MAIL_FETCH_STREAM_HEADER;
} else if ((fields & MAIL_FETCH_STREAM_HEADER) != 0)
str_append(str, "BODY.PEEK[HEADER] ");
else if (headers != NULL) {
Expand Down Expand Up @@ -362,8 +363,7 @@ imapc_mail_get_wanted_fetch_fields(struct imapc_mail *mail)
if (data->stream == NULL && data->access_part != 0) {
if ((data->access_part & (READ_BODY | PARSE_BODY)) != 0)
fields |= MAIL_FETCH_STREAM_BODY;
else
fields |= MAIL_FETCH_STREAM_HEADER;
fields |= MAIL_FETCH_STREAM_HEADER;
}
return fields;
}
Expand Down

0 comments on commit 51937e0

Please sign in to comment.