test fixups from Remi
[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_online_test();
7 ?>
8 --FILE--
9 <?php
10
11 use http\Client,
12 http\Client\Request;
13
14 include "helper/server.inc";
15
16 echo "Test\n";
17
18 server("proxy.inc", function($port) {
19 $client = new Client();
20 $request = new Request(
21 'POST',
22 "http://localhost:$port/",
23 array(
24 'Content-Length' => 0
25 )
26 );
27 $client->enqueue($request);
28 echo $client->send()->getResponse()->getResponseCode();
29 });
30
31 ?>
32
33 ===DONE===
34 --EXPECTF--
35 Test
36 200
37 ===DONE===