Possible null pointer dereference in php_http_url_mod() fixed.
[m6w6/ext-http] / tests / client014.phpt
1 --TEST--
2 reset content length when resetting body
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 skip_client_test();
7 ?>
8 --FILE--
9 <?php
10
11 echo "Test\n";
12
13 $client = new http\Client;
14 $request = new http\Client\Request("PUT", "put.php");
15 $request->setBody(new http\Message\Body(fopen(__FILE__, "r")));
16 $client->enqueue($request);
17 var_dump($request->getHeader("Content-Length"));
18 $request->setBody(new http\Message\Body);
19 $client->requeue($request);
20 var_dump($request->getHeader("Content-Length"));
21 ?>
22 ===DONE===
23 --EXPECTF--
24 Test
25 int(379)
26 bool(false)
27 ===DONE===