projects
/
m6w6
/
ext-http
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
- allow setting proxy to empty string, which ignores env
[m6w6/ext-http]
/
tests
/
stream_filters_001.phpt
1
--TEST--
2
stream filters
3
--SKIPIF--
4
<?php
5
include 'skip.inc';
6
?>
7
--FILE--
8
<?php
9
echo "-TEST\n";
10
11
define('F', 'http.test_stream_filters');
12
13
$f = fopen(F, 'w');
14
stream_filter_append($f, 'http.chunked_encode');
15
16
fwrite($f, "Here ");
17
fwrite($f, "we");
18
fwrite($f, " go!\n");
19
fclose($f);
20
21
var_dump(file_get_contents(F));
22
23
$f = fopen(F, 'r');
24
stream_filter_append($f, 'http.chunked_decode');
25
var_dump(fread($f, 256));
26
fclose($f);
27
28
unlink(F);
29
echo "Done\n";
30
?>
31
--EXPECTF--
32
%sTEST
33
string(30) "5
34
Here
35
2
36
we
37
5
38
go!
39
40
0
41
"
42
string(12) "Here we go!
43
"
44
Done