1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 19:52:20 +02:00
Files
archived-php-src/ext/curl/tests/bug68937.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

41 lines
690 B
PHP

--TEST--
Bug # #68937 (Segfault in curl_multi_exec)
--SKIPIF--
<?php
if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
include 'skipif.inc';
?>
--FILE--
<?php
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php";
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HEADER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_INFILESIZE => 1,
CURLOPT_HTTPHEADER => array(
'Expect:',
'Content-Length: 1',
),
CURLOPT_READFUNCTION => 'curl_read',
CURLOPT_CONNECTTIMEOUT=> 1,
CURLOPT_TIMEOUT=>1
));
function curl_read($ch, $fp, $len) {
var_dump($fp);
exit;
}
curl_exec($ch);
curl_close($ch);
?>
--EXPECT--
NULL