bug72185-fcgi-empty-frame.phpt 970 B

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