ZF-6219: Quoted charset in MIME part Content-type header
Description
Hello,
the character set in the Content-type header of MIME message part should not be quoted.
Content-Type: text/html; charset="utf-8"
should be replaced with:
Content-Type: text/html; charset=utf-8
As quotes are not neccessary, albeit allowed, they may cause problems to clients/MTA that do not support them correctly. All major webmail service providers are using the unquoted style, so I don't really see, why we shouldn't follow them.
RFC2045 describing the format of Content-Type header http://tools.ietf.org/html/rfc2045#section-5.1
Affected code of Zend Framework File: Zend/Mime/Part.php
public function getHeadersArray($EOL = Zend_Mime::LINEEND)
{
$headers = array();
$contentType = $this->type;
if ($this->charset) {
- $contentType .= '; charset="' . $this->charset . '"';
+ $contentType .= '; charset=' . $this->charset;
}
With regards, Ludek Stepan
Comments
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-04-10T16:53:10.000+0000
Hi, Ludek.
I ensure Your report on RFC. Solved in r14837