cleanup debug stuff
[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
13 echo "Test\n";
14
15 server("proxy.inc", function($port) {
16 $client = new http\Client;
17 $request = new http\Client\Request("PUT", "http://localhost:$port");
18 $request->setContentType("application/octet-stream");
19 for ($i = 0, $data = str_repeat("a",1024); $i < 128*1024; ++$i) {
20 $request->getBody()->append($data);
21 }
22 $request->setOptions(array("timeout" => 10, "expect_100_timeout" => 0));
23 $client->enqueue($request);
24 $client->send();
25 var_dump($client->getResponse()->getHeaders());
26 });
27
28 ?>
29 ===DONE===
30 --EXPECTF--
31 Test
32 array(5) {
33 ["Accept-Ranges"]=>
34 string(5) "bytes"
35 ["Etag"]=>
36 string(%d) "%s"
37 ["Last-Modified"]=>
38 string(%d) "%s"
39 ["X-Original-Transfer-Encoding"]=>
40 string(7) "chunked"
41 ["Content-Length"]=>
42 int(134217%d%d%d)
43 }
44 ===DONE===