From: Timo Sirainen Date: Mon, 6 Oct 2003 20:17:19 +0000 (+0300) Subject: BODY[HEADER] and RFC822.HEADER fetching was broken (why did it work before?..) X-Git-Tag: 1.1.alpha1~4298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a77bddd704784189944b731f5ce774bfb4440e0b;p=thirdparty%2Fdovecot%2Fcore.git BODY[HEADER] and RFC822.HEADER fetching was broken (why did it work before?..) --HG-- branch : HEAD --- diff --git a/src/imap/imap-fetch-body-section.c b/src/imap/imap-fetch-body-section.c index e72e3ddf10..444b83916a 100644 --- a/src/imap/imap-fetch-body-section.c +++ b/src/imap/imap-fetch-body-section.c @@ -317,7 +317,7 @@ static int fetch_header_from(struct imap_fetch_context *ctx, if (o_stream_send_str(ctx->output, str) < 0) return FALSE; return message_send(ctx->output, input, size, - body->skip, body->max_size, NULL, + body->skip, send_size, NULL, !mail->has_no_nuls) >= 0; } diff --git a/src/imap/imap-fetch.c b/src/imap/imap-fetch.c index 5d2655c305..aac8d8e24f 100644 --- a/src/imap/imap-fetch.c +++ b/src/imap/imap-fetch.c @@ -177,7 +177,8 @@ static int fetch_send_rfc822(struct imap_fetch_context *ctx, struct mail *mail) return FALSE; return message_send(ctx->output, stream, &body_size, - 0, (uoff_t)-1, NULL, !mail->has_no_nuls) >= 0; + 0, body_size.virtual_size, NULL, + !mail->has_no_nuls) >= 0; } static int fetch_send_rfc822_header(struct imap_fetch_context *ctx, @@ -200,7 +201,8 @@ static int fetch_send_rfc822_header(struct imap_fetch_context *ctx, return FALSE; return message_send(ctx->output, stream, &hdr_size, - 0, (uoff_t)-1, NULL, !mail->has_no_nuls) >= 0; + 0, hdr_size.virtual_size, NULL, + !mail->has_no_nuls) >= 0; } static int fetch_send_rfc822_text(struct imap_fetch_context *ctx, @@ -224,7 +226,8 @@ static int fetch_send_rfc822_text(struct imap_fetch_context *ctx, i_stream_seek(stream, hdr_size.physical_size); return message_send(ctx->output, stream, &body_size, - 0, (uoff_t)-1, NULL, !mail->has_no_nuls) >= 0; + 0, body_size.virtual_size, NULL, + !mail->has_no_nuls) >= 0; } static int fetch_mail(struct imap_fetch_context *ctx, struct mail *mail)