xref: /PHP-8.3/ext/iconv/tests/bug55146.phpt (revision e9f783fc)
1--TEST--
2Bug #55146 (iconv_mime_decode_headers() skips some headers)
3--EXTENSIONS--
4iconv
5--FILE--
6<?php
7
8$headers = <<< HEADERS
9X-Header-One: H4sIAAAAAAAAA+NgFlsCAAA=
10X-Header-Two: XtLePq6GTMn8G68F0
11HEADERS;
12var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR));
13
14$headers = <<< HEADERS
15X-Header-One: =
16X-Header-Two: XtLePq6GTMn8G68F0
17HEADERS;
18var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_STRICT));
19?>
20--EXPECT--
21array(2) {
22  ["X-Header-One"]=>
23  string(24) "H4sIAAAAAAAAA+NgFlsCAAA="
24  ["X-Header-Two"]=>
25  string(17) "XtLePq6GTMn8G68F0"
26}
27array(2) {
28  ["X-Header-One"]=>
29  string(1) "="
30  ["X-Header-Two"]=>
31  string(17) "XtLePq6GTMn8G68F0"
32}
33