projects
/
m6w6
/
ext-http
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
* docs
[m6w6/ext-http]
/
tests
/
051_parse_headers.phpt
1
--TEST--
2
http_parse_headers()
3
--SKIPIF--
4
<?php
5
extension_loaded('http') or die('ext/http not available');
6
strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
7
?>
8
--FILE--
9
<?php
10
print_r(http_parse_headers(
11
"Host: localhost\r\n".
12
"Nospace:here\r\n".
13
"Muchspace: there \r\n".
14
"Empty:\r\n".
15
"Empty2: \r\n".
16
": invalid\r\n".
17
" : bogus\r\n".
18
"Folded: one\r\n".
19
"\ttwo\r\n".
20
" three\r\n".
21
"stop\r\n"
22
));
23
?>
24
--EXPECTF--
25
Content-type: text/html
26
X-Powered-By: PHP/%s
27
28
Array
29
(
30
[Host] => localhost
31
[Nospace] => here
32
[Muchspace] => there
33
[Empty] =>
34
[Empty2] =>
35
[Folded] => one
36
two
37
three
38
)