/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
sapi/cli/tests/bug67429_1.phpt
37 строк
543 B
Nikita Popov
Use ephemeral port in more server tests
23 окт 2020, 15:26
23 окт 2020, 15:26
6ab4e33
Код
Авторство
О чём код?
--TEST-- FR #67429 (CLI server is missing some new HTTP response codes) --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php include "php_cli_server.inc"; php_cli_server_start(<<<PHP http_response_code(308); PHP ); $host = PHP_CLI_SERVER_HOSTNAME; $fp = php_cli_server_connect(); if(fwrite($fp, <<<HEADER GET / HTTP/1.1 HEADER )) { while (!feof($fp)) { echo fgets($fp); } } fclose($fp); ?> --EXPECTF-- HTTP/1.1 308 Permanent Redirect Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8