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));
19 $request = new http\Client\Request("GET", "http://localhost:$port?r1");
20 $client->enqueue($request);
22 while (($r = $client->getResponse())) {
23 dump_headers(null, $r->getHeaders());
25 $client->requeue($request);
26 $request = new http\Client\Request("GET", "http://localhost:$port?r2");
27 $client->enqueue($request);
29 while (($r = $client->getResponse())) {
30 dump_headers(null, $r->getHeaders());
39 Set-Cookie: counter=1;
40 X-Original-Transfer-Encoding: chunked
43 Set-Cookie: counter=2;
44 X-Original-Transfer-Encoding: chunked
47 Set-Cookie: counter=2;
48 X-Original-Transfer-Encoding: chunked