From 969547784e0aa96091467bf358cec3b3f06d3df1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 10 Sep 2015 06:10:02 -0400 Subject: [PATCH] Fix issue where Content-Length of some attachments could be set to wrong value causing browser errors (#1490482) --- program/steps/mail/get.inc | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 8a4217d..4ccb545 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -363,9 +363,8 @@ $sent = true; } else if ($part->size) { - if ($size = (int)$part->d_parameters['size']) { - header("Content-Length: $size"); - } + // Don't be tempted to set Content-Length to $part->d_parameters['size'] (#1490482) + // RFC2183 says "The size parameter indicates an approximate size" // 8th argument disables re-formatting of text/* parts (#1489267) $sent = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, true, null, false, 0, false); -- Gitblit v1.9.1