Download src/php/php-src/sapi/cli/tests/bug65633.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 638 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/cli/tests/bug65633.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/sapi/cli/tests/bug65633.phpt
-
curl -L -o bug65633.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/cli/tests/bug65633.phpt
638 Bytes
| --TEST-- | |
| Bug #65633 (built-in server treat some http headers as case-sensitive) | |
| --SKIPIF-- | |
| include "skipif.inc"; | |
| --FILE-- | |
| include "php_cli_server.inc"; | |
| php_cli_server_start(<<<'PHP' | |
| var_dump($_COOKIE, $_SERVER['HTTP_FOO']); | |
| PHP | |
| ); | |
| $host = PHP_CLI_SERVER_HOSTNAME; | |
| $fp = php_cli_server_connect(); | |
| if(fwrite($fp, <<<HEADER | |
| GET / HTTP/1.1 | |
| cookie: foo=bar | |
| foo: bar | |
| HEADER | |
| )) { | |
| while (!feof($fp)) { | |
| echo fgets($fp); | |
| } | |
| } | |
| fclose($fp); | |
| --EXPECTF-- | |
| HTTP/1.1 200 OK | |
| Date: %s | |
| Connection: close | |
| X-Powered-By: %s | |
| Content-type: text/html; charset=UTF-8 | |
| array(1) { | |
| ["foo"]=> | |
| string(3) "bar" | |
| } | |
| string(3) "bar" | |