]> granicus.if.org Git - php/commitdiff
Add "SEARCH" as supported HTTP verb.
authorMats Lindh <mats@lindh.no>
Thu, 16 Apr 2015 11:36:01 +0000 (13:36 +0200)
committerJulien Pauli <jpauli@php.net>
Tue, 12 May 2015 09:24:27 +0000 (11:24 +0200)
The "SEARCH" HTTP request method is described in RFC5323 as part of
WebDAV, and allows a client to initiate a server side search.

sapi/cli/php_http_parser.c
sapi/cli/php_http_parser.h

index 31ae4167d1920bf3c0a61d807724d95bf8c16f13..558a4efec3d9881a6daf89be757bb1e1214faae9 100644 (file)
@@ -91,6 +91,7 @@ static const char *method_strings[] =
   , "MOVE"
   , "PROPFIND"
   , "PROPPATCH"
+  , "SEARCH"
   , "UNLOCK"
   , "REPORT"
   , "MKACTIVITY"
@@ -630,6 +631,8 @@ size_t php_http_parser_execute (php_http_parser *parser,
           parser->method = PHP_HTTP_PUT;
         } else if (index == 1 && parser->method == PHP_HTTP_POST && ch == 'A') {
           parser->method = PHP_HTTP_PATCH;
+        } else if (index == 1 && parser->method == PHP_HTTP_SUBSCRIBE && ch == 'E') {
+          parser->method = PHP_HTTP_SEARCH;
         } 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') {
index 31502e213af7b814a11ecd187a4ee2da0b0a8c94..402e7e3c83b9e3cc3a7a3a5203464b8682ba3795 100644 (file)
@@ -90,6 +90,7 @@ enum php_http_method
   , PHP_HTTP_MOVE
   , PHP_HTTP_PROPFIND
   , PHP_HTTP_PROPPATCH
+  , PHP_HTTP_SEARCH
   , PHP_HTTP_UNLOCK
   /* subversion */
   , PHP_HTTP_REPORT