test fixups from Remi
[m6w6/ext-http] / tests / client025.phpt
index 866cd2e1502f8e0fa629dac64f40b17ed693c0f5..62f0342b53518d7c65d112466f7151daa5dd2765 100644 (file)
@@ -1,12 +1,13 @@
 --TEST--
 client seek
 --SKIPIF--
-<?php 
+<?php
 include "skipif.inc";
 ?>
 --FILE--
-<?php 
+<?php
 
+include "helper/dump.inc";
 include "helper/server.inc";
 
 echo "Test\n";
@@ -16,26 +17,27 @@ server("proxy.inc", function($port) {
        $request = new http\Client\Request("PUT", "http://localhost:$port");
        $request->setOptions(array("resume" => 1, "expect_100_timeout" => 0));
        $request->getBody()->append("123");
-       echo $client->enqueue($request)->send()->getResponse();
+       dump_message(null, $client->enqueue($request)->send()->getResponse());
 });
-
+// Content-length is 2 instead of 3 in older libcurls
 ?>
 ===DONE===
 --EXPECTF--
 Test
 HTTP/1.1 200 OK
 Accept-Ranges: bytes
+Content-Length: %d
 Etag: "%x"
 X-Original-Transfer-Encoding: chunked
-Content-Length: %d
+X-Request-Content-Length: 2
 
 PUT / HTTP/1.1
-Content-Range: bytes 1-2/3
-User-Agent: %s
-Host: localhost:%d
 Accept: */*
-Content-Length: 3
+Content-Length: %d
+Content-Range: bytes 1-2/3
 Expect: 100-continue
-X-Original-Content-Length: 3
+Host: localhost:%d
+User-Agent: %s
+X-Original-Content-Length: %d
 
 23===DONE===