1--TEST--
2Implement Req #61679 (Support HTTP PATCH method)
3--SKIPIF--
4<?php
5include "skipif.inc";
6?>
7--FILE--
8<?php
9include "php_cli_server.inc";
10php_cli_server_start(<<<'PHP'
11var_dump($_SERVER['REQUEST_METHOD']);
12PHP
13);
14
15$host = PHP_CLI_SERVER_HOSTNAME;
16$fp = php_cli_server_connect();
17
18if(fwrite($fp, <<<HEADER
19PATCH / HTTP/1.1
20Host: {$host}
21
22
23HEADER
24)) {
25    while (!feof($fp)) {
26        echo fgets($fp);
27    }
28}
29
30fclose($fp);
31?>
32--EXPECTF--
33HTTP/1.1 200 OK
34Host: %s
35Date: %s
36Connection: close
37X-Powered-By: %s
38Content-type: text/html; charset=UTF-8
39
40string(5) "PATCH"
41