fix tests
[m6w6/ext-http] / tests / client027.phpt
1 --TEST--
2 client cookie woes
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 skip_client_test();
7 ?>
8 --FILE--
9 <?php
10
11 include "helper/server.inc";
12 include "helper/dump.inc";
13
14 echo "Test\n";
15
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);
21 $client->send();
22 while (($r = $client->getResponse())) {
23 dump_headers(null, $r->getHeaders());
24 }
25 $client->requeue($request);
26 $request = new http\Client\Request("GET", "http://localhost:$port?r2");
27 $client->enqueue($request);
28 $client->send();
29 while (($r = $client->getResponse())) {
30 dump_headers(null, $r->getHeaders());
31 }
32 });
33
34 ?>
35 ===DONE===
36 --EXPECTF--
37 Test
38 Etag: ""
39 Set-Cookie: counter=1;
40 X-Original-Transfer-Encoding: chunked
41
42 Etag: ""
43 Set-Cookie: counter=2;
44 X-Original-Transfer-Encoding: chunked
45
46 Etag: ""
47 Set-Cookie: counter=2;
48 X-Original-Transfer-Encoding: chunked
49
50 ===DONE===