11 include "helper/server.inc";
12 include "helper/dump.inc";
16 server("cookie.inc", function($port) {
17 $client = new http\Client(null, "cookies");
18 $client->configure(array("pipelining" => false, "share_cookies" => false));
20 $request = new http\Client\Request("GET", "http://localhost:$port?r1");
21 $client->enqueue($request);
23 dump_responses($client, ["counter" => 1]);
25 $client->requeue($request);
27 dump_responses($client, ["counter" => 2]);
28 $client->dequeue($request);
30 $request = new http\Client\Request("GET", "http://localhost:$port?r2");
31 $client->enqueue($request);
33 dump_responses($client, ["counter" => 1]);
41 Set-Cookie: counter=1;
42 X-Original-Transfer-Encoding: chunked
45 Set-Cookie: counter=2;
46 X-Original-Transfer-Encoding: chunked
49 Set-Cookie: counter=1;
50 X-Original-Transfer-Encoding: chunked