projects
/
m6w6
/
ext-http
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
- http_parse_headers() now accepts a callback for handling of request/response lines
[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
print_r(http_parse_headers(
10
"Host: localhost\r\n".
11
"Nospace:here\r\n".
12
"Muchspace: there \r\n".
13
"Empty:\r\n".
14
"Empty2: \r\n".
15
": invalid\r\n".
16
" : bogus\r\n".
17
"Folded: one\r\n".
18
"\ttwo\r\n".
19
" three\r\n".
20
"stop\r\n"
21
));
22
?>
23
--EXPECTF--
24
Content-type: text/html
25
X-Powered-By: PHP/%s
26
27
Array
28
(
29
[Host] => localhost
30
[Nospace] => here
31
[Muchspace] => there
32
[Empty] =>
33
[Empty2] =>
34
[Folded] => one
35
two
36
three
37
)