1--TEST-- 2Bug # #68937 (Segfault in curl_multi_exec) 3--SKIPIF-- 4<?php 5if (getenv("SKIP_ONLINE_TESTS")) die("skip online test"); 6include 'skipif.inc'; 7?> 8--FILE-- 9<?php 10 11include 'server.inc'; 12$host = curl_cli_server_start(); 13 14$url = "{$host}/get.php"; 15 16$ch = curl_init($url); 17curl_setopt_array($ch, array( 18 CURLOPT_HEADER => false, 19 CURLOPT_RETURNTRANSFER => true, 20 CURLOPT_POST => true, 21 CURLOPT_INFILESIZE => 1, 22 CURLOPT_HTTPHEADER => array( 23 'Expect:', 24 'Content-Length: 1', 25 ), 26 CURLOPT_READFUNCTION => 'curl_read', 27 CURLOPT_CONNECTTIMEOUT=> 1, 28 CURLOPT_TIMEOUT=>1 29)); 30 31function curl_read($ch, $fp, $len) { 32 var_dump($fp); 33 exit; 34} 35 36curl_exec($ch); 37curl_close($ch); 38?> 39--EXPECTF-- 40NULL 41