1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/sapi/cli/tests/php_cli_server_018.phpt
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

41 lines
571 B
PHP

--TEST--
Implement Req #61679 (Support HTTP PATCH method)
--SKIPIF--
<?php
include "skipif.inc";
?>
--FILE--
<?php
include "php_cli_server.inc";
php_cli_server_start(<<<'PHP'
var_dump($_SERVER['REQUEST_METHOD']);
PHP
);
$host = PHP_CLI_SERVER_HOSTNAME;
$fp = php_cli_server_connect();
if(fwrite($fp, <<<HEADER
PATCH / HTTP/1.1
Host: {$host}
HEADER
)) {
while (!feof($fp)) {
echo fgets($fp);
}
}
fclose($fp);
?>
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
string(5) "PATCH"