From: Michael M Slusarz Date: Wed, 3 Dec 2008 11:57:32 +0000 (-0700) Subject: Only add charset param if dealing with text/* part. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a3601975428c2f1b548ae04f6456e7f369244903;p=horde.git Only add charset param if dealing with text/* part. --- diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index ee0b46255..bc3a54eef 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -741,7 +741,12 @@ class Horde_Mime_Part } /* Get the Content-Type itself. */ - $headers->replaceHeader('Content-Type', $this->getType(), array('params' => $this->getAllContentTypeParameters())); + $ptype = $this->getPrimaryType(); + $c_params = $this->getAllContentTypeParameters(); + if ($ptype != 'text') { + unset($c_params['charset']); + } + $headers->replaceHeader('Content-Type', $this->getType(), array('params' => $c_params)); /* Get the description, if any. */ if (($descrip = $this->getDescription())) { @@ -754,7 +759,6 @@ class Horde_Mime_Part } /* message/* parts require no additional header information. */ - $ptype = $this->getPrimaryType(); if ($ptype == 'message') { return $headers; }