blob: b3c2015314cef2fb5e2cfb96c8f48752037294ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
--TEST--
Bug #55146 (iconv_mime_decode_headers() skips some headers)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
$headers = <<< HEADERS
X-Header-One: H4sIAAAAAAAAA+NgFlsCAAA=
X-Header-Two: XtLePq6GTMn8G68F0
HEADERS;
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR));
$headers = <<< HEADERS
X-Header-One: =
X-Header-Two: XtLePq6GTMn8G68F0
HEADERS;
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_STRICT));
?>
===DONE===
--EXPECT--
array(2) {
["X-Header-One"]=>
string(24) "H4sIAAAAAAAAA+NgFlsCAAA="
["X-Header-Two"]=>
string(17) "XtLePq6GTMn8G68F0"
}
array(2) {
["X-Header-One"]=>
string(1) "="
["X-Header-Two"]=>
string(17) "XtLePq6GTMn8G68F0"
}
===DONE===
|