fix test
[m6w6/ext-http] / tests / client026.phpt
1 --TEST--
2 client stream 128M
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 skip_client_test();
7 ?>
8 --FILE--
9 <?php
10
11 include "helper/server.inc";
12 include "helper/dump.inc";
13
14 echo "Test\n";
15
16 server("proxy.inc", function($port) {
17 $client = new http\Client;
18 $request = new http\Client\Request("PUT", "http://localhost:$port");
19 $request->setContentType("application/octet-stream");
20 for ($i = 0, $data = str_repeat("a",1024); $i < 128*1024; ++$i) {
21 $request->getBody()->append($data);
22 }
23 $request->setOptions(array("timeout" => 10, "expect_100_timeout" => 0));
24 $client->enqueue($request);
25 $client->send();
26 dump_headers(null, $client->getResponse()->getHeaders());
27 });
28
29 ?>
30 ===DONE===
31 --EXPECTF--
32 Test
33 Accept-Ranges: bytes
34 Content-Length: 134217960
35 Etag: "%x"
36 Last-Modified: %s
37 X-Original-Transfer-Encoding: chunked
38
39 ===DONE===