src: support ACL (WebDAV, RFC3744, Section 8.1).

PR-URL: https://github.com/joyent/http-parser/pull/260
Reviewed-By: Fedor Indutny <fedor@indutny.com>
make-http-max-header-size-gyp-configurable
Ivan Enderlin 10 years ago committed by Fedor Indutny
parent 4f69be2221
commit eb5e9928b4

@ -959,6 +959,7 @@ reexecute:
parser->method = (enum http_method) 0; parser->method = (enum http_method) 0;
parser->index = 1; parser->index = 1;
switch (ch) { switch (ch) {
case 'A': parser->method = HTTP_ACL; break;
case 'B': parser->method = HTTP_BIND; break; case 'B': parser->method = HTTP_BIND; break;
case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break; case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break;
case 'D': parser->method = HTTP_DELETE; break; case 'D': parser->method = HTTP_DELETE; break;

@ -107,21 +107,22 @@ typedef int (*http_cb) (http_parser*);
XX(16, BIND, BIND) \ XX(16, BIND, BIND) \
XX(17, REBIND, REBIND) \ XX(17, REBIND, REBIND) \
XX(18, UNBIND, UNBIND) \ XX(18, UNBIND, UNBIND) \
XX(19, ACL, ACL) \
/* subversion */ \ /* subversion */ \
XX(19, REPORT, REPORT) \ XX(20, REPORT, REPORT) \
XX(20, MKACTIVITY, MKACTIVITY) \ XX(21, MKACTIVITY, MKACTIVITY) \
XX(21, CHECKOUT, CHECKOUT) \ XX(22, CHECKOUT, CHECKOUT) \
XX(22, MERGE, MERGE) \ XX(23, MERGE, MERGE) \
/* upnp */ \ /* upnp */ \
XX(23, MSEARCH, M-SEARCH) \ XX(24, MSEARCH, M-SEARCH) \
XX(24, NOTIFY, NOTIFY) \ XX(25, NOTIFY, NOTIFY) \
XX(25, SUBSCRIBE, SUBSCRIBE) \ XX(26, SUBSCRIBE, SUBSCRIBE) \
XX(26, UNSUBSCRIBE, UNSUBSCRIBE) \ XX(27, UNSUBSCRIBE, UNSUBSCRIBE) \
/* RFC-5789 */ \ /* RFC-5789 */ \
XX(27, PATCH, PATCH) \ XX(28, PATCH, PATCH) \
XX(28, PURGE, PURGE) \ XX(29, PURGE, PURGE) \
/* CalDAV */ \ /* CalDAV */ \
XX(29, MKCALENDAR, MKCALENDAR) \ XX(30, MKCALENDAR, MKCALENDAR) \
enum http_method enum http_method
{ {

@ -3748,6 +3748,7 @@ main (void)
"BIND", "BIND",
"REBIND", "REBIND",
"UNBIND", "UNBIND",
"ACL",
"REPORT", "REPORT",
"MKACTIVITY", "MKACTIVITY",
"CHECKOUT", "CHECKOUT",

Loading…
Cancel
Save