add proxy_ssl request options
[m6w6/ext-http] / tests / bug66388.phpt
1 --TEST--
2 Bug #66388 (Crash on POST with Content-Length:0 and untouched body)
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 skip_client_test();
7 skip_online_test();
8 ?>
9 --FILE--
10 <?php
11
12 use http\Client,
13 http\Client\Request;
14
15 include "helper/server.inc";
16
17 echo "Test\n";
18
19 server("proxy.inc", function($port) {
20 $client = new Client();
21 $request = new Request(
22 'POST',
23 "http://localhost:$port/",
24 array(
25 'Content-Length' => 0
26 )
27 );
28 $client->setOptions(["timeout" => 30]);
29 $client->enqueue($request);
30 echo $client->send()->getResponse()->getResponseCode();
31 });
32
33 ?>
34
35 ===DONE===
36 --EXPECTF--
37 Test
38 200
39 ===DONE===