--TEST--
GHSA-9pqp-7h25-4f32
--SKIPIF--
--FILE--
'1',
'CONTENT_TYPE' => "multipart/form-data; boundary=$boundary",
'CONTENT_LENGTH' => strlen($body),
'REQUEST_METHOD' => 'POST',
'SCRIPT_FILENAME' => __DIR__ . '/GHSA-9pqp-7h25-4f32.inc',
]);
$spec = [
0 => ['pipe', 'r'],
1 => STDOUT,
2 => STDOUT,
];
$pipes = [];
print "Starting...\n";
$handle = proc_open($cmd, $spec, $pipes, getcwd(), $env);
fwrite($pipes[0], $body);
$status = proc_close($handle);
print "\n";
}
for ($offset = -1; $offset <= 1; $offset++) {
test(FILLUNIT - strlen("\r\n--") + $offset);
}
?>
--EXPECTF--
Boundary len: 5115
Starting...
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
Hello world
array(1) {
["koko"]=>
string(5124) "BBB
--AAA%sCCC"
}
Boundary len: 5116
Starting...
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
Hello world
array(1) {
["koko"]=>
string(5125) "BBB
--AAA%sCCC"
}
Boundary len: 5117
Starting...
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
Warning: Boundary too large in multipart/form-data POST data in Unknown on line 0
Hello world
array(0) {
}