blob: 24aa83c6206948b7f17e44263a0fdc1c9945a9b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--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
|