update config.m4; allow disabling idna; add idnkit
[m6w6/ext-http] / tests / client025.phpt
1 --TEST--
2 client seek
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 skip_client_test();
7 ?>
8 --FILE--
9 <?php
10
11 include "helper/dump.inc";
12 include "helper/server.inc";
13
14 echo "Test\n";
15
16 server("proxy.inc", function($port) {
17 $client = new http\Client;
18 $request = new http\Client\Request("PUT", "http://localhost:$port");
19 $request->setOptions(array("resume" => 1, "expect_100_timeout" => 0));
20 $request->getBody()->append("123");
21 dump_message(null, $client->enqueue($request)->send()->getResponse());
22 });
23 // Content-length is 2 instead of 3 in older libcurls
24 ?>
25 ===DONE===
26 --EXPECTF--
27 Test
28 HTTP/1.1 200 OK
29 Accept-Ranges: bytes
30 Content-Length: %d
31 Etag: "%x"
32 X-Original-Transfer-Encoding: chunked
33 X-Request-Content-Length: 2
34
35 PUT / HTTP/1.1
36 Accept: */*
37 Content-Length: %d
38 Content-Range: bytes 1-2/3
39 Expect: 100-continue
40 Host: localhost:%d
41 User-Agent: %s
42 X-Original-Content-Length: %d
43
44 23===DONE===