use new propro version for travis
[m6w6/ext-http] / tests / filterchunked.phpt
1 --TEST--
2 chunked filter
3 --SKIPIF--
4 <?php include "skipif.inc"; ?>
5 --FILE--
6 <?php
7 list($in, $out) = stream_socket_pair(
8 STREAM_PF_UNIX,
9 STREAM_SOCK_STREAM,
10 STREAM_IPPROTO_IP
11 );
12 stream_filter_append($in, "http.chunked_decode", STREAM_FILTER_READ);
13 stream_filter_append($out, "http.chunked_encode", STREAM_FILTER_WRITE,
14 array());
15
16 $file = file(__FILE__);
17 foreach($file as $line) {
18 fwrite($out, $line);
19 fflush($out);
20 }
21 fclose($out);
22 if (implode("",$file) !== ($read = fread($in, filesize(__FILE__)))) {
23 echo "got: $read\n";
24 }
25 fclose($in);
26 ?>
27 DONE
28 --EXPECT--
29 DONE