ZF-3318: Zend_Mime_Decode::splitHeaderField() does not take leading whitespaces of header-values into account


I receive this emails send via a newsletter-broker by a large german internet-provider-company frequently. One of their parts has the following signature:

Content-Type: multipart/alternative; boundary= "----=_Alternative_1211565553483705f1280701.15526894"

(Note the whitespace between "boundary=" and its value "----=_Alternative_1211565553483705f1280701.15526894")

When trying to parse for the message parts, the value of the boundary-property gets translated to (see Zend/Mime/Decode.php line 219)


which causes the Zend_Mime_Decode::splitMime() to substitute this value to (see Zend/Mime/Decode.php line 54)


resulting in not finding the related part for this boundary.

Suggested fix: use trim() before looking up quotes in header-values.


Patch that fixes the code for this bug. partial test class

Please evaluate and fix/categorize as necessary.

Solved in SVN r12352

Changing issues in preparation for the 1.7.0 release.