X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2FHttpRequest_007.phpt;h=8989de1b8699fda8d4aba79d4d894d24d908b896;hp=cf651be9ffa4e842b3176b37587dd05456bef12c;hb=d7ce6cca59bb57636f075048fc3ff48038c3e45e;hpb=fa1a275e2b5e1b9dfb5bcbf97b51ef2b568e433c diff --git a/tests/HttpRequest_007.phpt b/tests/HttpRequest_007.phpt index cf651be..8989de1 100644 --- a/tests/HttpRequest_007.phpt +++ b/tests/HttpRequest_007.phpt @@ -9,35 +9,56 @@ checkcls('HttpRequest'); recordHistory = true; $r->addHeaders(array('content-type' => 'text/plain')); $r->setPutFile(__FILE__); $r->send(); -var_dump($r->getRawRequestMessage()); +var_dump($r->getHistory()->toString(true)); echo "Done\n"; ?> --EXPECTF-- -%sTEST -string(%d) "PUT /.print_request.php HTTP/1.1 -User-Agent: %s +%aTEST +string(%d) "PUT /ext-http/.print_put.php5 HTTP/1.1 +User-Agent: PECL::HTTP/%a Host: dev.iworks.at Accept: */* -content-type: text/plain -Content-Length: 278 +Content-Type: text/plain +Content-Length: %d Expect: 100-continue recordHistory = true; $r->addHeaders(array('content-type' => 'text/plain')); $r->setPutFile(__FILE__); $r->send(); -var_dump($r->getRawRequestMessage()); +var_dump($r->getHistory()->toString(true)); echo "Done\n"; ?> + +HTTP/1.1 100 Continue +HTTP/1.1 200 OK +Date: %a +Server: %a +Vary: Accept-Encoding +Content-Type: text/html +X-Original-Transfer-Encoding: chunked +Content-Length: %d + +recordHistory = true; +$r->addHeaders(array('content-type' => 'text/plain')); +$r->setPutFile(__FILE__); +$r->send(); +var_dump($r->getHistory()->toString(true)); +echo "Done\n"; +?> + " Done -