11 include "helper/server.inc";
12 include "helper/dump.inc";
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);
23 $request->setOptions(array("timeout" => 10, "expect_100_timeout" => 0));
24 $client->enqueue($request);
26 dump_headers(null, $client->getResponse()->getHeaders());
37 X-Original-Transfer-Encoding: chunked
38 X-Request-Content-Length: 134217728