- fix PHP4 build (has no only_exceptions INI setting
[m6w6/ext-http] / tests / parse_headers_001.phpt
1 --TEST--
2 http_parse_headers()
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 ?>
7 --FILE--
8 <?php
9 echo "-TEST\n";
10 print_r(http_parse_headers(
11 "Host: localhost\r\n".
12 "Host: ambigious\r\n".
13 "Nospace:here\r\n".
14 "Muchspace: there \r\n".
15 "Empty:\r\n".
16 "Empty2: \r\n".
17 ": invalid\r\n".
18 " : bogus\r\n".
19 "Folded: one\r\n".
20 "\ttwo\r\n".
21 " three\r\n".
22 "stop\r\n"
23 ));
24 ?>
25 --EXPECTF--
26 %sTEST
27 Array
28 (
29 [Host] => Array
30 (
31 [0] => localhost
32 [1] => ambigious
33 )
34
35 [Nospace] => here
36 [Muchspace] => there
37 [Empty] =>
38 [Empty2] =>
39 [Folded] => one
40 two
41 three
42 )
43