Bug #63839 [Opn->Asn]: iconv_mime_decode_headers function is skipping headers

From: Date: Sun, 23 Dec 2012 17:46:36 +0000
Subject: Bug #63839 [Opn->Asn]: iconv_mime_decode_headers function is skipping headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-175565@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63839&edit=1 ID: 63839 Updated by: felipe@php.net Reported by: nidhikaushal28 at gmail dot com Summary: iconv_mime_decode_headers function is skipping headers -Status: Open +Status: Assigned Type: Bug Package: ICONV related Operating System: Windows 7, CentOS PHP Version: 5.3.20 -Assigned To: +Assigned To: aharvey Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2012-12-23 14:48:08] nidhikaushal28 at gmail dot com Description: ------------ iconv_mime_decode_headers function is skipping headers when '=?' is present in the subject. For example if the subject header of a mime message is : Subject: Reply Is? white side-LED =? in Help Then the rest of the headers after subject like content-type, date etc are not returned. Similar bug is filed https://bugs.php.net/bug.php?id=52941 but in the above mentioned example the subject is not encoded. My php version is 5.3.3 and the issue is reproducible in 5.3.20 and 5.4.10. Test script: --------------- <?php $headers = 'From: "xyz" <xyz@xyz.com> To: <xyz@xyz.com> Subject: Reply Is? white side-LED =? in Help Date: Sat, 22 Dec 2012 Message-ID: <006f01cde00e$d9f79da0$8de6d8e0> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac3gDtcH2huHjzYcQVmFJPPoWjJogA== Content-Language: en-us '; $headers = iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR); print_r($headers); ?> Expected result: ---------------- Array ( [From] => "xyz" <xyz@xyz.com> [To] => <xyz@xyz.com> [Subject] => Reply Is? white side-LED =? in Help [Date] => Sat, 22 Dec 2012 [Message-ID] => <006f01cde00e$d9f79da0$8de6d8e0> [MIME-Version] => 1.0 [Content-Type] => multipart/alternative; boundary="----=_NextPart_000_0070_0 1CDE03C.F3AFD9A0" [X-Mailer] => Microsoft Office Outlook 12.0 [Thread-Index] => Ac3gDtcH2huHjzYcQVmFJPPoWjJogA== [Content-Language] => en-us ) Actual result: -------------- Array ( [From] => "xyz" <xyz@xyz.com> [To] => <xyz@xyz.com> [Subject] => Reply Is? white side-LED ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63839&edit=1

« previous php.bugs (#175565) next »