xref: /PHP-7.4/sapi/cli/tests/bug67429_1.phpt (revision 13274912)
1--TEST--
2FR #67429 (CLI server is missing some new HTTP response codes)
3--SKIPIF--
4<?php
5include "skipif.inc";
6?>
7--FILE--
8<?php
9include "php_cli_server.inc";
10
11$proc_handle = php_cli_server_start(<<<PHP
12http_response_code(308);
13PHP
14);
15
16$host = PHP_CLI_SERVER_HOSTNAME;
17$fp = php_cli_server_connect();
18
19if(fwrite($fp, <<<HEADER
20GET / HTTP/1.1
21
22
23HEADER
24)) {
25    while (!feof($fp)) {
26        echo fgets($fp);
27    }
28}
29
30fclose($fp);
31?>
32--EXPECTF--
33HTTP/1.1 308 Permanent Redirect
34Date: %s
35Connection: close
36X-Powered-By: %s
37Content-type: text/html; charset=UTF-8
38