add proxy_ssl request options
[m6w6/ext-http] / tests / bug69313.phpt
1 --TEST--
2 Bug #69313 (http\Client doesn't send GET body)
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, $stdin, $stdout, $stderr) {
17 $request = new http\Client\Request("GET", "http://localhost:$port/");
18 $request->setHeader("Content-Type", "text/plain");
19 $request->getBody()->append("foo");
20 $client = new http\Client();
21 $client->enqueue($request);
22 $client->send();
23 dump_message(null, $client->getResponse());
24 });
25
26 ?>
27
28 Done
29 --EXPECTF--
30 Test
31 HTTP/1.1 200 OK
32 Accept-Ranges: bytes
33 Content-Length: %d
34 Etag: "%s"
35 X-Original-Transfer-Encoding: chunked
36 X-Request-Content-Length: 3
37
38 GET / HTTP/1.1
39 Accept: */*
40 Content-Length: 3
41 Content-Type: text/plain
42 Host: localhost:%d
43 User-Agent: %s
44 X-Original-Content-Length: 3
45
46 foo
47 Done