- Standard:
. Fixed bug #78902 (Memory leak when using stream_filter_append). (liudaixiao)
+- Testing:
+ . Fixed bug #78090 (bug45161.phpt takes forever to finish). (cmb)
+
- XSL:
. Fixed bug #70078 (XSL callbacks with nodes as parameter leak memory). (cmb)
Bug #45161 (Reusing a curl handle leaks memory)
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- exit("skip not for Windows");
-}
-if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
-}
+include 'skipif.inc';
$curl_version = curl_version();
if ($curl_version['version_number'] < 0x071100) {
exit("skip: test works only with curl >= 7.17.0");
?>
--FILE--
<?php
+include 'server.inc';
+$host = curl_cli_server_start();
// Fill memory for test
$ch = curl_init();
-$fp = fopen('/dev/null', 'w');
+$fp = fopen(PHP_OS_FAMILY === 'Windows' ? 'nul' : '/dev/null', 'w');
/*
$i = $start = $end = 100000.00;
// Start actual test
$start = memory_get_usage() + 1024;
for($i = 0; $i < 1024; $i++) {
- curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:9/');
+ curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
}
Bug #46739 (array returned by curl_getinfo should contain content_type key)
--SKIPIF--
<?php
-if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
-}
+include 'skipif.inc';
?>
--FILE--
<?php
-$ch = curl_init('http://127.0.0.1:9/');
+include 'server.inc';
+$host = curl_cli_server_start();
+$ch = curl_init("{$host}/get.inc");
+curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
$info = curl_getinfo($ch);