Download src/php/php-src/sapi/fpm/tests/bug80849-fpm.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 706 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/fpm/tests/bug80849-fpm.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/sapi/fpm/tests/bug80849-fpm.phpt
-
curl -L -o bug80849-fpm.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/fpm/tests/bug80849-fpm.phpt
706 Bytes
| --TEST-- | |
| Bug #80849 (HTTP Status header truncation) | |
| --SKIPIF-- | |
| include "skipif.inc"; | |
| --FILE-- | |
| require_once "tester.inc"; | |
| $cfg = <<<EOT | |
| [global] | |
| error_log = {{FILE:LOG}} | |
| [unconfined] | |
| listen = {{ADDR}} | |
| pm = dynamic | |
| pm.max_children = 5 | |
| pm.start_servers = 1 | |
| pm.min_spare_servers = 1 | |
| pm.max_spare_servers = 3 | |
| EOT; | |
| $code = <<<EOT | |
| <?php | |
| header('HTTP/1.1 201 ' . str_repeat('A', 1014), true); | |
| EOT; | |
| $tester = new FPM\Tester($cfg, $code); | |
| $tester->start(); | |
| $tester->expectLogStartNotices(); | |
| $tester | |
| ->request() | |
| ->expectHeader('Status', '201 ' . str_repeat('A', 1011)); | |
| $tester->terminate(); | |
| $tester->close(); | |
| --CLEAN-- | |
| require_once "tester.inc"; | |
| FPM\Tester::clean(); | |
| --EXPECT-- | |