Download src/php/php-src/sapi/fpm/tests/bug64539-status-json-encoding.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 853 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/fpm/tests/bug64539-status-json-encoding.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/sapi/fpm/tests/bug64539-status-json-encoding.phpt
-
curl -L -o bug64539-status-json-encoding.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/fpm/tests/bug64539-status-json-encoding.phpt
853 Bytes
| --TEST-- | |
| FPM: bug64539 - status json format escaping | |
| --SKIPIF-- | |
| include "skipif.inc"; | |
| --FILE-- | |
| require_once "tester.inc"; | |
| $cfg = <<<EOT | |
| [global] | |
| error_log = {{FILE:LOG}} | |
| [unconfined] | |
| listen = {{ADDR}} | |
| pm = static | |
| pm.max_children = 2 | |
| pm.status_path = /status | |
| catch_workers_output = yes | |
| EOT; | |
| $code = <<<EOT | |
| <?php | |
| usleep(200000); | |
| EOT; | |
| $tester = new FPM\Tester($cfg, $code); | |
| $tester->start(); | |
| $tester->expectLogStartNotices(); | |
| $responses = $tester | |
| ->multiRequest([ | |
| ['query' => 'a=b"c'], | |
| ['uri' => '/status', 'query' => 'full&json', 'delay' => 100000], | |
| ]); | |
| $responses[1]->expectJsonBodyPatternForStatusProcessField('request uri', '\?a=b"c$'); | |
| $tester->terminate(); | |
| $tester->expectLogTerminatingNotices(); | |
| $tester->close(); | |
| Done | |
| --EXPECT-- | |
| Done | |
| --CLEAN-- | |
| require_once "tester.inc"; | |
| FPM\Tester::clean(); | |