ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     --TEST--
client history
--SKIPIF--
<?php 
include "skipif.inc";
skip_client_test();
?>
--FILE--
<?php 

include "helper/server.inc";

echo "Test\n";

server("env.inc", function($port) {
	$body = new http\Message\Body;
	$body->append("foobar");

	$request = new http\Client\Request;
	$request->setBody($body);
	$request->setRequestMethod("POST");
	$request->setRequestUrl("http://localhost:$port");

	$client = new http\Client;
	$client->recordHistory = true;

	$client->enqueue($request)->send();
	echo $client->getHistory()->toString(true);

	$client->requeue($request)->send();
	echo $client->getHistory()->toString(true);
});
?>
Done
--EXPECTF--
Test
POST http://localhost:%d/ HTTP/1.1
Content-Length: 6

foobar
HTTP/1.1 200 OK
Accept-Ranges: bytes
X-Request-Content-Length: 6
X-Original-Transfer-Encoding: chunked
Content-Length: 19

string(6) "foobar"

POST http://localhost:%d/ HTTP/1.1
Content-Length: 6

foobar
HTTP/1.1 200 OK
Accept-Ranges: bytes
X-Request-Content-Length: 6
X-Original-Transfer-Encoding: chunked
Content-Length: 19

string(6) "foobar"

POST http://localhost:%d/ HTTP/1.1
Content-Length: 6

foobar
HTTP/1.1 200 OK
Accept-Ranges: bytes
X-Request-Content-Length: 6
X-Original-Transfer-Encoding: chunked
Content-Length: 19

string(6) "foobar"

Done
