11 include "helper/server.inc";
15 function dump($response) {
16 echo $response->getHeader("X-Req"),"\n";
19 server("pipeline.inc", function($port, $stdin, $stdout, $stderr) {
20 /* tell the server we're about to send 3 pipelined messages */
23 $client = new http\Client(null);
24 $client->configure(array("pipelining" => true, "max_host_connections" => 0));
26 /* this is just to let curl know the server may be capable of pipelining */
27 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port"), "dump");
30 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/1"), "dump");
31 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/2"), "dump");
32 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/3"), "dump");