1--TEST--
2FPM: bug72185 - FastCGI empty frame incorrectly created
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--FILE--
6<?php
7
8require_once "tester.inc";
9
10$cfg = <<<EOT
11[global]
12error_log = {{FILE:LOG}}
13[unconfined]
14listen = {{ADDR}}
15pm = dynamic
16pm.max_children = 2
17pm.start_servers = 1
18pm.min_spare_servers = 1
19pm.max_spare_servers = 2
20catch_workers_output = yes
21decorate_workers_output = no
22php_value[html_errors] = false
23EOT;
24
25$code = <<<'EOT'
26<?php
27for ($i=0; $i < 167; $i++) {
28    error_log('PHP is the best programming language');
29}
30echo 'end';
31EOT;
32
33$tester = new FPM\Tester($cfg, $code);
34$tester->start();
35$tester->expectLogStartNotices();
36$tester->request()->expectBody('end');
37for ($i=0; $i < 167; $i++) {
38    $tester->expectLogNotice("PHP message: PHP is the best programming language");
39}
40$tester->terminate();
41$tester->expectLogTerminatingNotices();
42$tester->close();
43
44?>
45Done
46--EXPECT--
47Done
48--CLEAN--
49<?php
50require_once "tester.inc";
51FPM\Tester::clean();
52?>
53