diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-06-11 10:20:53 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-06-11 10:20:53 +0200 |
commit | 2950ce49eff42eb08cd4363975a3292692cbccd8 (patch) | |
tree | 2ac6b3b9a4daa1a484281b8021ea5c66333b0e34 /program/steps/mail/get.inc | |
parent | d447a4f2296e5e9afc9d79cede0e49b2d6210f9f (diff) | |
parent | 7ac99af37b3b761b4daf2f0d9340c17e7855c234 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps/mail/get.inc')
-rw-r--r-- | program/steps/mail/get.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 658538a20..bcd57dee0 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -199,13 +199,18 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) { $sent = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, false, $stdout); } } + // send part as-it-is else { - // turn off output buffering and print part content if ($part->body) { + header("Content-Length: " . sizeof($part->body)); echo $part->body; $sent = true; } else if ($part->size) { + if ($size = (int)$part->d_parameters['size']) { + header("Content-Length: $size"); + } + $sent = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, true); } } |