summaryrefslogtreecommitdiff
path: root/sapi/cli/php_http_parser.c
diff options
context:
space:
mode:
authorLars Strojny <lstrojny@php.net>2012-09-18 22:16:51 +0200
committerLars Strojny <lstrojny@php.net>2012-09-18 22:16:51 +0200
commitaa133ea2821787c0cf4ac8750ddd22341752f135 (patch)
tree7351c6f7b359cfd8eccfb3bb778f452c1b664ba7 /sapi/cli/php_http_parser.c
parent1e1db9d9bb8dffc9421d8d8ac0eeafcf33389d26 (diff)
downloadphp-git-aa133ea2821787c0cf4ac8750ddd22341752f135.tar.gz
Merged GitHub PR #190: Support for the HTTP PATCH method in CLI webserver
Diffstat (limited to 'sapi/cli/php_http_parser.c')
-rw-r--r--sapi/cli/php_http_parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c
index 4a95f82575..d3bc496f4e 100644
--- a/sapi/cli/php_http_parser.c
+++ b/sapi/cli/php_http_parser.c
@@ -81,6 +81,7 @@ static const char *method_strings[] =
, "HEAD"
, "POST"
, "PUT"
+ , "PATCH"
, "CONNECT"
, "OPTIONS"
, "TRACE"
@@ -627,6 +628,8 @@ size_t php_http_parser_execute (php_http_parser *parser,
parser->method = PHP_HTTP_PROPFIND; /* or HTTP_PROPPATCH */
} else if (index == 1 && parser->method == PHP_HTTP_POST && ch == 'U') {
parser->method = PHP_HTTP_PUT;
+ } else if (index == 1 && parser->method == PHP_HTTP_POST && ch == 'A') {
+ parser->method = PHP_HTTP_PATCH;
} else if (index == 2 && parser->method == PHP_HTTP_UNLOCK && ch == 'S') {
parser->method = PHP_HTTP_UNSUBSCRIBE;
} else if (index == 4 && parser->method == PHP_HTTP_PROPFIND && ch == 'P') {