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