11 include "helper/server.inc";
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);
22 $request->setOptions(array("timeout" => 10, "expect_100_timeout" => 0));
23 $client->enqueue($request);
25 var_dump($client->getResponse()->getHeaders());
39 ["X-Original-Transfer-Encoding"]=>