7 if (version_compare(http\Client\Curl\Versions\CURL, "7.62.0", ">=")) {
8 die("skip CURL_VERSION >= 7.62 -- pipelining disabled\n");
14 include "helper/server.inc";
18 function dump($response) {
19 echo $response->getHeader("X-Req"),"\n";
22 server("pipeline.inc", function($port, $stdin, $stdout, $stderr) {
23 /* tell the server we're about to send 3 pipelined messages */
26 $client = new http\Client(null);
27 $client->configure(array("pipelining" => true, "max_host_connections" => 0));
29 /* this is just to let curl know the server may be capable of pipelining */
30 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port"), "dump");
33 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/1"), "dump");
34 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/2"), "dump");
35 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/3"), "dump");