|
|
|
@ -85,44 +85,44 @@ typedef int (*http_cb) (http_parser*);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Request Methods */
|
|
|
|
|
#define HTTP_METHOD_MAP(XX) \
|
|
|
|
|
XX(0, DELETE) \
|
|
|
|
|
XX(1, GET) \
|
|
|
|
|
XX(2, HEAD) \
|
|
|
|
|
XX(3, POST) \
|
|
|
|
|
XX(4, PUT) \
|
|
|
|
|
/* pathological */ \
|
|
|
|
|
XX(5, CONNECT) \
|
|
|
|
|
XX(6, OPTIONS) \
|
|
|
|
|
XX(7, TRACE) \
|
|
|
|
|
/* webdav */ \
|
|
|
|
|
XX(8, COPY) \
|
|
|
|
|
XX(9, LOCK) \
|
|
|
|
|
XX(10, MKCOL) \
|
|
|
|
|
XX(11, MOVE) \
|
|
|
|
|
XX(12, PROPFIND) \
|
|
|
|
|
XX(13, PROPPATCH) \
|
|
|
|
|
XX(14, SEARCH) \
|
|
|
|
|
XX(15, UNLOCK) \
|
|
|
|
|
/* subversion */ \
|
|
|
|
|
XX(16, REPORT) \
|
|
|
|
|
XX(17, MKACTIVITY) \
|
|
|
|
|
XX(18, CHECKOUT) \
|
|
|
|
|
XX(19, MERGE) \
|
|
|
|
|
/* upnp */ \
|
|
|
|
|
XX(20, MSEARCH) \
|
|
|
|
|
XX(21, NOTIFY) \
|
|
|
|
|
XX(22, SUBSCRIBE) \
|
|
|
|
|
XX(23, UNSUBSCRIBE) \
|
|
|
|
|
/* RFC-5789 */ \
|
|
|
|
|
XX(24, PATCH) \
|
|
|
|
|
XX(25, PURGE) \
|
|
|
|
|
#define HTTP_METHOD_MAP(XX) \
|
|
|
|
|
XX(0, DELETE, DELETE) \
|
|
|
|
|
XX(1, GET, GET) \
|
|
|
|
|
XX(2, HEAD, HEAD) \
|
|
|
|
|
XX(3, POST, POST) \
|
|
|
|
|
XX(4, PUT, PUT) \
|
|
|
|
|
/* pathological */ \
|
|
|
|
|
XX(5, CONNECT, CONNECT) \
|
|
|
|
|
XX(6, OPTIONS, OPTIONS) \
|
|
|
|
|
XX(7, TRACE, TRACE) \
|
|
|
|
|
/* webdav */ \
|
|
|
|
|
XX(8, COPY, COPY) \
|
|
|
|
|
XX(9, LOCK, LOCK) \
|
|
|
|
|
XX(10, MKCOL, MKCOL) \
|
|
|
|
|
XX(11, MOVE, MOVE) \
|
|
|
|
|
XX(12, PROPFIND, PROPFIND) \
|
|
|
|
|
XX(13, PROPPATCH, PROPPATCH) \
|
|
|
|
|
XX(14, SEARCH, SEARCH) \
|
|
|
|
|
XX(15, UNLOCK, UNLOCK) \
|
|
|
|
|
/* subversion */ \
|
|
|
|
|
XX(16, REPORT, REPORT) \
|
|
|
|
|
XX(17, MKACTIVITY, MKACTIVITY) \
|
|
|
|
|
XX(18, CHECKOUT, CHECKOUT) \
|
|
|
|
|
XX(19, MERGE, MERGE) \
|
|
|
|
|
/* upnp */ \
|
|
|
|
|
XX(20, MSEARCH, M-SEARCH) \
|
|
|
|
|
XX(21, NOTIFY, NOTIFY) \
|
|
|
|
|
XX(22, SUBSCRIBE, SUBSCRIBE) \
|
|
|
|
|
XX(23, UNSUBSCRIBE, UNSUBSCRIBE) \
|
|
|
|
|
/* RFC-5789 */ \
|
|
|
|
|
XX(24, PATCH, PATCH) \
|
|
|
|
|
XX(25, PURGE, PURGE) \
|
|
|
|
|
|
|
|
|
|
enum http_method
|
|
|
|
|
{
|
|
|
|
|
#define XX(num, name) HTTP_##name = num,
|
|
|
|
|
#define XX(num, name, string) HTTP_##name = num,
|
|
|
|
|
HTTP_METHOD_MAP(XX)
|
|
|
|
|
#undef X
|
|
|
|
|
#undef XX
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|