summaryrefslogtreecommitdiff
path: root/sapi/cli/php_http_parser.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2016-06-10 22:02:23 -0500
committerAaron Piotrowski <aaron@trowski.com>2016-06-10 22:02:23 -0500
commite3c681aa5cc71122a8d2fae42e6513fc413ccac8 (patch)
tree5f1df62f7b666028edb0ee1adf083a52d63df45a /sapi/cli/php_http_parser.c
parentfb4e3085cbaa76eb8f28eebf848a81d1c0190067 (diff)
parent792e89385ca6fc722a03590722eb7745a2374720 (diff)
downloadphp-git-e3c681aa5cc71122a8d2fae42e6513fc413ccac8.tar.gz
Merge branch 'master' into throw-error-in-extensions
Diffstat (limited to 'sapi/cli/php_http_parser.c')
-rw-r--r--sapi/cli/php_http_parser.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c
index d289e80f70..5f8eb3ce0b 100644
--- a/sapi/cli/php_http_parser.c
+++ b/sapi/cli/php_http_parser.c
@@ -89,6 +89,7 @@ static const char *method_strings[] =
, "LOCK"
, "MKCOL"
, "MOVE"
+ , "MKCALENDAR"
, "PROPFIND"
, "PROPPATCH"
, "SEARCH"
@@ -326,7 +327,8 @@ size_t php_http_parser_execute (php_http_parser *parser,
const char *data,
size_t len)
{
- char c, ch;
+ char ch;
+ signed char c;
const char *p = data, *pe;
size_t to_read;
@@ -584,7 +586,7 @@ size_t php_http_parser_execute (php_http_parser *parser,
case 'G': parser->method = PHP_HTTP_GET; break;
case 'H': parser->method = PHP_HTTP_HEAD; break;
case 'L': parser->method = PHP_HTTP_LOCK; break;
- case 'M': parser->method = PHP_HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ break;
+ case 'M': parser->method = PHP_HTTP_MKCOL; /* or MOVE, MKCALENDAR, MKACTIVITY, MERGE, M-SEARCH */ break;
case 'N': parser->method = PHP_HTTP_NOTIFY; break;
case 'O': parser->method = PHP_HTTP_OPTIONS; break;
case 'P': parser->method = PHP_HTTP_POST; /* or PROPFIND or PROPPATCH or PUT */ break;
@@ -622,6 +624,8 @@ size_t php_http_parser_execute (php_http_parser *parser,
} else if (parser->method == PHP_HTTP_MKCOL) {
if (index == 1 && ch == 'O') {
parser->method = PHP_HTTP_MOVE;
+ } else if (index == 3 && ch == 'A') {
+ parser->method = PHP_HTTP_MKCALENDAR;
} else if (index == 1 && ch == 'E') {
parser->method = PHP_HTTP_MERGE;
} else if (index == 1 && ch == '-') {