- bugs
[m6w6/ext-http] / tests / split_response_002.phpt
1 --TEST--
2 http_split_response() list bug (mem-leaks)
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 ?>
7 --FILE--
8 <?php
9 $data = "HTTP/1.1 200 Ok\r\nContent-Type: text/plain\r\nContent-Language: de-AT\r\nDate: Sat, 22 Jan 2005 18:10:02 GMT\r\n\r\nHallo Du!";
10 // this generates mem-leaks - no idea how to fix them
11 class t {
12 var $r = array();
13 function fail($data) {
14 list($this->r['headers'], $this->r['body']) = http_split_response($data);
15 }
16 }
17
18 $t = new t;
19 $t->fail($data);
20 echo "Done\n";
21 ?>
22 --EXPECTF--
23 Content-type: text/html
24 X-Powered-By: PHP/%s
25
26 Done
27