+/*********************************************************************
+ *
+ * Function : unknown_method
+ *
+ * Description : Checks whether a method is unknown.
+ *
+ * Parameters :
+ * 1 : method = points to a http method
+ *
+ * Returns : TRUE if it's unknown, FALSE otherwise.
+ *
+ *********************************************************************/
+static int unknown_method(const char *method)
+{
+ static const char *known_http_methods[] = {
+ /* Basic HTTP request type */
+ "GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS", "TRACE", "CONNECT",
+ /* webDAV extensions (RFC2518) */
+ "PROPFIND", "PROPPATCH", "MOVE", "COPY", "MKCOL", "LOCK", "UNLOCK",
+ /*
+ * Microsoft webDAV extension for Exchange 2000. See:
+ * http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0001.html
+ * http://msdn.microsoft.com/library/en-us/wss/wss/_webdav_methods.asp
+ */
+ "BCOPY", "BMOVE", "BDELETE", "BPROPFIND", "BPROPPATCH",
+ /*
+ * Another Microsoft webDAV extension for Exchange 2000. See:
+ * http://systems.cs.colorado.edu/grunwald/MobileComputing/Papers/draft-cohen-gena-p-base-00.txt
+ * http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0001.html
+ * http://msdn.microsoft.com/library/en-us/wss/wss/_webdav_methods.asp
+ */
+ "SUBSCRIBE", "UNSUBSCRIBE", "NOTIFY", "POLL",
+ /*
+ * Yet another WebDAV extension, this time for
+ * Web Distributed Authoring and Versioning (RFC3253)
+ */
+ "VERSION-CONTROL", "REPORT", "CHECKOUT", "CHECKIN", "UNCHECKOUT",
+ "MKWORKSPACE", "UPDATE", "LABEL", "MERGE", "BASELINE-CONTROL", "MKACTIVITY",
+ NULL
+ };
+ int i;
+
+ for (i = 0; NULL != known_http_methods[i]; i++)
+ {
+ if (0 == strcmpic(method, known_http_methods[i]))
+ {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+
+}
+
+