Possible null pointer dereference in php_http_url_mod() fixed.
[m6w6/ext-http] / tests / params013.phpt
1 --TEST--
2 header params rfc5987
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 $p = new http\Params("attachment; filename*=IsO-8859-1''d%f6ner.pdf");
12 var_dump($p->params, (string) $p);
13 $p = new http\Params("bar; title*=iso-8859-1'en'%A3%20rates");
14 var_dump($p->params, (string) $p);
15 $p = new http\Params("bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates");
16 var_dump($p->params, (string) $p);
17
18 ?>
19 ===DONE===
20 --EXPECT--
21 Test
22 array(1) {
23 ["attachment"]=>
24 array(2) {
25 ["value"]=>
26 bool(true)
27 ["arguments"]=>
28 array(1) {
29 ["*rfc5987*"]=>
30 array(1) {
31 ["filename"]=>
32 array(1) {
33 [""]=>
34 string(10) "döner.pdf"
35 }
36 }
37 }
38 }
39 }
40 string(42) "attachment;filename*=utf-8''d%C3%B6ner.pdf"
41 array(1) {
42 ["bar"]=>
43 array(2) {
44 ["value"]=>
45 bool(true)
46 ["arguments"]=>
47 array(1) {
48 ["*rfc5987*"]=>
49 array(1) {
50 ["title"]=>
51 array(1) {
52 ["en"]=>
53 string(8) "£ rates"
54 }
55 }
56 }
57 }
58 }
59 string(34) "bar;title*=utf-8'en'%C2%A3%20rates"
60 array(1) {
61 ["bar"]=>
62 array(2) {
63 ["value"]=>
64 bool(true)
65 ["arguments"]=>
66 array(1) {
67 ["*rfc5987*"]=>
68 array(1) {
69 ["title"]=>
70 array(1) {
71 [""]=>
72 string(16) "£ and € rates"
73 }
74 }
75 }
76 }
77 }
78 string(50) "bar;title*=utf-8''%C2%A3%20and%20%E2%82%AC%20rates"
79 ===DONE===