X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fclient008.phpt;h=616a9e427ec5c36c9f7d06d3975d8ac36ca464e5;hp=2585f235d0b3e07456aee66fef8315ee12e156f7;hb=refs%2Fheads%2Fmaster;hpb=b6f8b5f25a50022dd7c67acf8f7c7ddc13e9ffc8 diff --git a/tests/client008.phpt b/tests/client008.phpt index 2585f23..616a9e4 100644 --- a/tests/client008.phpt +++ b/tests/client008.phpt @@ -1,30 +1,40 @@ --TEST-- -client features +client pipelining --SKIPIF-- =")) { + die("skip CURL_VERSION >= 7.62 -- pipelining disabled\n"); +} ?> --FILE-- configure(["pipelining" => true, "use_eventloop" => true]); +server("pipeline.inc", function($port, $stdin) { + fputs($stdin, "2\n"); + $request = new http\Client\Request("GET", "http://localhost:$port"); + + $client = new http\Client(); + $client->configure(array("pipelining" => true, "use_eventloop" => true)); + $client->enqueue($request); + $client->send(); + $client->enqueue(clone $request); $client->enqueue(clone $request); - + $client->send(); - + while ($client->getResponse()) { echo "R\n"; } -} +}); ?> Done