Lines Matching defs:method
175 /* The max method number. Method numbers are used to shift bitmasks,
216 * being 304 or 204, the request method being HEAD, already
575 * If the request method was GET or HEAD, failure means the server
633 * Singleton registry of additional methods. This maps new method names
643 /* internal function to register one method/number pair */
653 /* This internal function is used to clear the method registry
714 /* Check if the method was previously registered. If it was
715 * return the associated method number.
723 /* The method registry has run out of dynamically
724 * assignable method numbers. Log this and return M_INVALID.
728 "registering method %s.",
739 static int lookup_builtin_method(const char *method, apr_size_t len)
756 switch (method[0])
759 return (method[1] == 'U'
760 && method[2] == 'T'
763 return (method[1] == 'E'
764 && method[2] == 'T'
771 switch (method[0])
774 return (method[1] == 'E'
775 && method[2] == 'A'
776 && method[3] == 'D'
779 return (method[1] == 'O'
780 && method[2] == 'S'
781 && method[3] == 'T'
784 return (method[1] == 'O'
785 && method[2] == 'V'
786 && method[3] == 'E'
789 return (method[1] == 'O'
790 && method[2] == 'C'
791 && method[3] == 'K'
794 return (method[1] == 'O'
795 && method[2] == 'P'
796 && method[3] == 'Y'
799 return (method[1] == 'R'
800 && method[2] == 'E'
801 && method[3] == 'W'
804 return (method[1] == 'H'
805 && method[2] == 'E'
806 && method[3] == 'N'
813 switch (method[2])
816 return (memcmp(method, "PATCH", 5) == 0
819 return (memcmp(method, "MERGE", 5) == 0
822 return (memcmp(method, "MKCOL", 5) == 0
825 return (memcmp(method, "LABEL", 5) == 0
828 return (memcmp(method, "TRACE", 5) == 0
835 switch (method[0])
838 switch (method[5])
841 return (memcmp(method, "UNLOCK", 6) == 0
844 return (memcmp(method, "UPDATE", 6) == 0
850 return (memcmp(method, "REPORT", 6) == 0
853 return (memcmp(method, "DELETE", 6) == 0
860 switch (method[1])
863 return (memcmp(method, "OPTIONS", 7) == 0
866 return (memcmp(method, "CONNECT", 7) == 0
869 return (memcmp(method, "CHECKIN", 7) == 0
876 switch (method[0])
879 return (memcmp(method, "PROPFIND", 8) == 0
882 return (memcmp(method, "CHECKOUT", 8) == 0
889 return (memcmp(method, "PROPPATCH", 9) == 0
893 switch (method[0])
896 return (memcmp(method, "UNCHECKOUT", 10) == 0
899 return (memcmp(method, "MKACTIVITY", 10) == 0
906 return (memcmp(method, "MKWORKSPACE", 11) == 0
910 return (memcmp(method, "VERSION-CONTROL", 15) == 0
914 return (memcmp(method, "BASELINE-CONTROL", 16) == 0
924 /* Get the method number associated with the given string, assumed to
925 * contain an HTTP method. Returns M_INVALID if not recognized.
927 * This is the first step toward placing method names in a configurable
931 AP_DECLARE(int) ap_method_number_of(const char *method)
933 int len = strlen(method);
934 int which = lookup_builtin_method(method, len);
939 /* check if the method has been dynamically registered */
941 int *methnum = apr_hash_get(methods_registry, method, len);
952 * Turn a known method number into a name.
959 the provided method number. */
1010 /* Build the Allow field-value from the request handler method mask.
1031 /* the M_GET method actually refers to two methods */
1165 "<p>The requested method ",
1166 ap_escape_html(r->pool, r->method),
1183 "<p>A request of the requested method ",
1184 ap_escape_html(r->pool, r->method),
1198 ap_escape_html(r->pool, r->method), " to ",
1231 ap_escape_html(r->pool, r->method),
1267 "given before the method can be applied.</p>\n");
1269 return("<p>The method could not be performed on the resource\n"
1287 return("<p>The method could not be performed on the resource\n"
1543 * Create a new method list with the specified number of preallocated
1557 * Make a copy of a method list (primarily for subrequests that may
1576 * Return true if the specified HTTP method is in the provided
1577 * method list.
1579 AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method)
1589 methnum = ap_method_number_of(method);
1594 * Otherwise, see if the method name is in the array or string names
1601 if (strcmp(method, methods[i]) == 0) {
1609 * Add the specified method to a method list (if it isn't already there).
1611 AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method)
1622 methnum = ap_method_number_of(method);
1628 * Otherwise, see if the method name is in the array of string names.
1633 if (strcmp(method, methods[i]) == 0) {
1639 *xmethod = method;
1643 * Remove the specified method from a method list.
1646 const char *method)
1655 methnum = ap_method_number_of(method);
1661 * Otherwise, see if the method name is in the array of string names.
1667 if (strcmp(method, methods[i]) == 0) {
1681 * Reset a method list to be completely empty.