--TEST--
-pipelining
+client pipelining
--SKIPIF--
<?php
include "skipif.inc";
--TEST--
-proxy - send proxy headers for a proxy request
+client proxy - send proxy headers for a proxy request
--SKIPIF--
<?php
include "skipif.inc";
$c = new http\Client;
$r = new http\Client\Request("GET", "http://www.example.com/");
$r->setOptions(array(
- "timeout" => 3,
+ "timeout" => 10,
"proxytunnel" => true,
"proxyheader" => array("Hello" => "there!"),
"proxyhost" => "localhost",
echo $e;
}
echo $c->getResponse()->getBody();
- unset($r, $client);
});
?>
--TEST--
-proxy - don't send proxy headers for a standard request
+client proxy - don't send proxy headers for a standard request
--SKIPIF--
<?php
include "skipif.inc";
for ($i = 0, $data = str_repeat("a",1024); $i < 128*1024; ++$i) {
$request->getBody()->append($data);
}
- $request->setOptions(["expect_100_timeout" => 0]);
+ $request->setOptions(["timeout" => 10, "expect_100_timeout" => 0]);
$client->enqueue($request);
$client->send();
var_dump($client->getResponse()->getHeaders());
["X-Original-Transfer-Encoding"]=>
string(7) "chunked"
["Content-Length"]=>
- int(134217973)
+ int(134217%d%d%d)
}
===DONE===
if ($request->getHeader("Proxy-Connection")) {
$response = new http\Env\Response;
+ $response->setEnvRequest($request);
$response->send($client);
/* soak up the request following the connect */