2 client cookie sharing disabled
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("share_cookies" => false));
19 $request = new http\Client\Request("GET", "http://localhost:$port");
20 $client->enqueue($request);
22 while (($r = $client->getResponse())) {
23 dump_headers(null, $r->getHeaders());
25 /* requeue the previous request */
26 $client->requeue($request);
27 $request = new http\Client\Request("GET", "http://localhost:$port");
28 $client->enqueue($request);
30 while (($r = $client->getResponse())) {
31 dump_headers(null, $r->getHeaders());
33 $request = new http\Client\Request("GET", "http://localhost:$port");
34 $client->enqueue($request);
36 while (($r = $client->getResponse())) {
37 dump_headers(null, $r->getHeaders());
39 $request = new http\Client\Request("GET", "http://localhost:$port");
40 $client->enqueue($request);
42 while (($r = $client->getResponse())) {
43 dump_headers(null, $r->getHeaders());
52 Set-Cookie: counter=1;
53 X-Original-Transfer-Encoding: chunked
56 Set-Cookie: counter=1;
57 X-Original-Transfer-Encoding: chunked
60 Set-Cookie: counter=2;
61 X-Original-Transfer-Encoding: chunked
64 Set-Cookie: counter=1;
65 X-Original-Transfer-Encoding: chunked
68 Set-Cookie: counter=1;
69 X-Original-Transfer-Encoding: chunked