projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Backport v4 updates
[m6w6/ext-http]
/
tests
/
client027.phpt
diff --git
a/tests/client027.phpt
b/tests/client027.phpt
index d33a58db02c84dbb42b4d39dc6bc77d397957f00..b87fa653dd108aba9f320e10e185950f72cc08e7 100644
(file)
--- a/
tests/client027.phpt
+++ b/
tests/client027.phpt
@@
-15,20
+15,22
@@
echo "Test\n";
server("cookie.inc", function($port) {
$client = new http\Client(null, "cookies");
server("cookie.inc", function($port) {
$client = new http\Client(null, "cookies");
- $client->configure(array("pipelining" => false));
+ $client->configure(array("pipelining" => false, "share_cookies" => false));
+
$request = new http\Client\Request("GET", "http://localhost:$port?r1");
$client->enqueue($request);
$client->send();
$request = new http\Client\Request("GET", "http://localhost:$port?r1");
$client->enqueue($request);
$client->send();
- while (($r = $client->getResponse())) {
- dump_headers(null, $r->getHeaders());
- }
+ dump_responses($client, ["counter" => 1]);
+
$client->requeue($request);
$client->requeue($request);
+ $client->send();
+ dump_responses($client, ["counter" => 2]);
+ $client->dequeue($request);
+
$request = new http\Client\Request("GET", "http://localhost:$port?r2");
$client->enqueue($request);
$client->send();
$request = new http\Client\Request("GET", "http://localhost:$port?r2");
$client->enqueue($request);
$client->send();
- while (($r = $client->getResponse())) {
- dump_headers(null, $r->getHeaders());
- }
+ dump_responses($client, ["counter" => 1]);
});
?>
});
?>
@@
-44,7
+46,7
@@
Set-Cookie: counter=2;
X-Original-Transfer-Encoding: chunked
Etag: ""
X-Original-Transfer-Encoding: chunked
Etag: ""
-Set-Cookie: counter=
2
;
+Set-Cookie: counter=
1
;
X-Original-Transfer-Encoding: chunked
===DONE===
X-Original-Transfer-Encoding: chunked
===DONE===