1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 14:31:06 +02:00
Files
archived-php-src/ext/curl/tests/bug71523.phpt
Xinchen Hui d645706547 Online test
2016-02-05 19:56:23 +08:00

32 lines
629 B
PHP

--TEST--
Bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_multi_exec)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (getenv("SKIP_ONLINE_TESTS")) {
die("skip online test");
}
?>
--FILE--
<?php
$base = curl_init('http://www.google.com/');
curl_setopt($base, CURLOPT_RETURNTRANSFER, true);
$mh = curl_multi_init();
for ($i = 0; $i < 2; ++$i) {
$ch = curl_copy_handle($base);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Foo: Bar']);
curl_multi_add_handle($mh, $ch);
}
do {
curl_multi_exec($mh, $active);
} while ($active);
?>
okey
--EXPECTF--
okey