Author: leithoff
New Revision: 55350
URL: http://svn.stylite.de/viewvc/egroupware?rev=55350&view=rev
Log:
attempt to fix an issue whith screwed Content-Transfer-Encoding when opening attached/forwarded messages (message/rfc822)
Modified:
branches/14.2/emailadmin/inc/class.emailadmin_imapbase.inc.php
— branches/14.2/emailadmin/inc/class.emailadmin_imapbase.inc.php (original)
+++ branches/14.2/emailadmin/inc/class.emailadmin_imapbase.inc.php Thu Mar 10 16:11:09 2016
@@ -5680,7 +5680,7 @@
// we need to set content on structure to decode transfer encoding
$part->setContents(
$this->getBodyPart($_uid, $part->getMimeId(), null, $_preserveSeen, $_stream, $encoding, $fetchAsBinary),
-
array('encoding' => (!$fetchAsBinary&&!$encoding?'8bit':$encoding)));
return $part;
}
@@ -6625,6 +6625,7 @@
{
$structure = Horde_Mime_Part::parseMessage($message);
$mailer->setBasePart($structure);
-
//error_log(__METHOD__.__LINE__.':'.array2string($structure));
// unfortunately parseMessage does NOT return parsed headers (we assume header is shorter then 8k)
$start = is_string($message) ? substr($message, 0, 8192) :
@@ -6641,7 +6642,14 @@
$overwrite = !$n;
switch($header)
{
-
case 'Content-Transfer-Encoding':
-
//as we parse the message and this sets the part with a Content-Transfer-Encoding, we
-
//should not overwrite it with the header-values of the source-message as the encoding
-
//may be altered when retrieving the message e.g. from server
-
//error_log(__METHOD__.__LINE__.':'.$header.'->'.$val.'<->'.$mailer->getHeader('Content-Transfer-Encoding'));
-
break;
default:
-
//error_log(__METHOD__.__LINE__.':'.$header.'->'.$val);
$mailer->addHeader($header, $val, $overwrite);
}
}
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs