]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
BODY[HEADER] and RFC822.HEADER fetching was broken (why did it work before?..)
authorTimo Sirainen <tss@iki.fi>
Mon, 6 Oct 2003 20:17:19 +0000 (23:17 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 6 Oct 2003 20:17:19 +0000 (23:17 +0300)
--HG--
branch : HEAD

src/imap/imap-fetch-body-section.c
src/imap/imap-fetch.c

index e72e3ddf108f1d0199ccda2639f775414ca972fe..444b83916a1180d22dd06044279d6f3d4ba4af8b 100644 (file)
@@ -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;
        }
 
index 5d2655c3050bc5ebaf65c208bd57016c3462e88a..aac8d8e24fc3d09544326139d1b5b80abd16f4cf 100644 (file)
@@ -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)