From 76ef3c1710bd22c560f9459f00452050d72f44db Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 10 Jan 2006 19:04:43 +0000 Subject: [PATCH] - use http_get_request_body() on the server side --- tests/HttpRequest_007.phpt | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/tests/HttpRequest_007.phpt b/tests/HttpRequest_007.phpt index cf651be..74ce527 100644 --- a/tests/HttpRequest_007.phpt +++ b/tests/HttpRequest_007.phpt @@ -9,35 +9,57 @@ 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 +string(%d) "HTTP/1.1 200 OK +Date: %s +Server: Apache/%s +X-Powered-By: PHP/5%s +Vary: Accept-Encoding +Content-Type: text/html +X-Original-Transfer-Encoding: chunked +Content-Length: 281 + +recordHistory = true; +$r->addHeaders(array('content-type' => 'text/plain')); +$r->setPutFile(__FILE__); +$r->send(); +var_dump($r->getHistory()->toString(true)); +echo "Done\n"; +?> + +PUT /.print_put.php5 HTTP/1.1 +User-Agent: PECL::HTTP/%s Host: dev.iworks.at Accept: */* -content-type: text/plain -Content-Length: 278 +Content-Type: text/plain +Content-Length: 281 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"; ?> + " Done -- 2.30.2