Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #78090: bug45161.phpt takes forever to finish
This commit is contained in:
Christoph M. Becker 2020-02-04 00:54:54 +01:00
commit fabe6aa7dc
2 changed files with 10 additions and 12 deletions

View file

@ -2,19 +2,16 @@
Bug #45161 (Reusing a curl handle leaks memory) Bug #45161 (Reusing a curl handle leaks memory)
--SKIPIF-- --SKIPIF--
<?php <?php
if (substr(PHP_OS, 0, 3) == 'WIN') { include 'skipif.inc';
exit("skip not for Windows");
}
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?> ?>
--FILE-- --FILE--
<?php <?php
include 'server.inc';
$host = curl_cli_server_start();
// Fill memory for test // Fill memory for test
$ch = curl_init(); $ch = curl_init();
$fp = fopen('/dev/null', 'w'); $fp = fopen(PHP_OS_FAMILY === 'Windows' ? 'nul' : '/dev/null', 'w');
/* /*
$i = $start = $end = 100000.00; $i = $start = $end = 100000.00;
@ -28,7 +25,7 @@ for ($i = 0; $i < 100; $i++) {
// Start actual test // Start actual test
$start = memory_get_usage() + 1024; $start = memory_get_usage() + 1024;
for($i = 0; $i < 1024; $i++) { 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_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch); curl_exec($ch);
} }

View file

@ -2,13 +2,14 @@
Bug #46739 (array returned by curl_getinfo should contain content_type key) Bug #46739 (array returned by curl_getinfo should contain content_type key)
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded("curl")) { include 'skipif.inc';
exit("skip curl extension not loaded");
}
?> ?>
--FILE-- --FILE--
<?php <?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); curl_exec($ch);
$info = curl_getinfo($ch); $info = curl_getinfo($ch);