Fixed CGI tests

This commit is contained in:
Dmitry Stogov 2006-05-24 13:29:19 +00:00
parent b629056504
commit db2452bb42

View File

@ -1436,7 +1436,7 @@ COMMAND $cmd
/* when using CGI, strip the headers from the output */
$headers = "";
if (isset($old_php) && preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $out, $match)) {
$output = $match[2];
$output = trim($match[2]);
$rh = preg_split("/[\n\r]+/",$match[1]);
$headers = array();
foreach ($rh as $line) {