|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-08-05 00:15 UTC] cmb@php.net
-Package: Feature/Change Request
+Package: ICONV related
[2021-03-03 13:36 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
Description: ------------ In RFC 822 all header names are defined as case independent. Therefore it would be useful if a mode exists that lowercases all header names and also merge multiple headers with the lowercased name in iconv_mime_decode_header(). It is possible to do that after iconv_mime_decode_header(), but merging multiple headers needs a fair amount of code, which is also already in iconv_mime_decode_header(). Reproduce code: --------------- $message = <<<ETX received: line 1 RECEIVED: line 2 Received: line 3 Subject: test ETX; var_dump(iconv_mime_decode_headers($message, ICONV_MIME_DECODE_LOWER)); Expected result: ---------------- array(2) { ["received"]=> array(4) { [0]=> string(6) "line 1" [1]=> string(6) "line 2" [2]=> string(6) "line 3" [3]=> string(6) "line 4" } ["subject"]=> string(4) "test" } Actual result: -------------- // currently not possible - with the default mode: array(4) { ["received"]=> string(6) "line 1" ["RECEIVED"]=> string(6) "line 2" ["Received"]=> array(2) { [0]=> string(6) "line 3" [1]=> string(6) "line 4" } ["Subject"]=> string(4) "test" }