Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
src: support ACL (WebDAV, RFC3744, Section 8.1).
Browse files Browse the repository at this point in the history
PR-URL: #260
Reviewed-By: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
Hywan authored and indutny committed Jul 21, 2015
1 parent 4f69be2 commit eb5e992
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions http_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ size_t http_parser_execute (http_parser *parser,
parser->method = (enum http_method) 0;
parser->index = 1;
switch (ch) {
case 'A': parser->method = HTTP_ACL; break;
case 'B': parser->method = HTTP_BIND; break;
case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break;
case 'D': parser->method = HTTP_DELETE; break;
Expand Down
23 changes: 12 additions & 11 deletions http_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,22 @@ typedef int (*http_cb) (http_parser*);
XX(16, BIND, BIND) \
XX(17, REBIND, REBIND) \
XX(18, UNBIND, UNBIND) \
XX(19, ACL, ACL) \
/* subversion */ \
XX(19, REPORT, REPORT) \
XX(20, MKACTIVITY, MKACTIVITY) \
XX(21, CHECKOUT, CHECKOUT) \
XX(22, MERGE, MERGE) \
XX(20, REPORT, REPORT) \
XX(21, MKACTIVITY, MKACTIVITY) \
XX(22, CHECKOUT, CHECKOUT) \
XX(23, MERGE, MERGE) \
/* upnp */ \
XX(23, MSEARCH, M-SEARCH) \
XX(24, NOTIFY, NOTIFY) \
XX(25, SUBSCRIBE, SUBSCRIBE) \
XX(26, UNSUBSCRIBE, UNSUBSCRIBE) \
XX(24, MSEARCH, M-SEARCH) \
XX(25, NOTIFY, NOTIFY) \
XX(26, SUBSCRIBE, SUBSCRIBE) \
XX(27, UNSUBSCRIBE, UNSUBSCRIBE) \
/* RFC-5789 */ \
XX(27, PATCH, PATCH) \
XX(28, PURGE, PURGE) \
XX(28, PATCH, PATCH) \
XX(29, PURGE, PURGE) \
/* CalDAV */ \
XX(29, MKCALENDAR, MKCALENDAR) \
XX(30, MKCALENDAR, MKCALENDAR) \

enum http_method
{
Expand Down
1 change: 1 addition & 0 deletions test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3748,6 +3748,7 @@ main (void)
"BIND",
"REBIND",
"UNBIND",
"ACL",
"REPORT",
"MKACTIVITY",
"CHECKOUT",
Expand Down

0 comments on commit eb5e992

Please sign in to comment.