This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Content-Type header handling #107
Open
Description
Hi
There is a case when emails have Content-Type header, defined with keyword "ContentType", for example:
ContentType: text/html; charset="UTF-8"
In this case error appears:
Invalid header line for Content-Type string
Looking header fieldName normalization, I see that Content-Type
, Content_Type
, Content Type
, ContentType
will be normalized to contenttype
. So contenttype
will be stored in Zend\Mail\Headers::$headersKeys
and appropriate header in Zend\Mail\Headers::$headers
.
Than on header loading pluginClassLoader will load Zend\Mail\Header\ContentType
and method Zend\Mail\Header\ContentType::fromString()
is called.
But there is condition that do not accept 'contenttype` value.
It looks like inconsistent behavior. I understand that rfc2045 accepts Content-Type
keyword only, but in real cases other keywords can appear.