11 include "helper/server.inc";
15 server("pipeline.inc", function($port, $stdin, $stdout, $stderr) {
16 /* tell the server we're about to send 3 pipelined messages */
19 $client = new http\Client(null);
20 $client->configure(array("pipelining" => true, "max_host_connections" => 0));
22 /* this is just to let curl know the server may be capable of pipelining */
23 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port"));
26 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/1"));
27 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/2"));
28 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/3"));
31 while (($response = $client->getResponse())) {
43 X-Original-Transfer-Encoding: chunked
47 X-Original-Transfer-Encoding: chunked
51 X-Original-Transfer-Encoding: chunked
55 X-Original-Transfer-Encoding: chunked