]> git.ipfire.org Git - thirdparty/squid.git/blob - src/http/MethodType.h
Polish: Http::MethodType upgrade
[thirdparty/squid.git] / src / http / MethodType.h
1 #ifndef SQUID_SRC_HTTP_METHODTYPE_H
2 #define SQUID_SRC_HTTP_METHODTYPE_H
3
4 namespace Http
5 {
6
7 // see IANA registry:
8 // also: https://datatracker.ietf.org/doc/draft-ietf-httpbis-method-registrations
9 typedef enum _method_t {
10 METHOD_NONE = 0,
11
12 #if NO_SPECIAL_HANDLING
13 // RFC 2068
14 METHOD_LINK,
15 METHOD_UNLINK,
16 #endif
17
18 // RFC 2616 (HTTP)
19 METHOD_GET,
20 METHOD_POST,
21 METHOD_PUT,
22 METHOD_HEAD,
23 METHOD_CONNECT,
24 METHOD_TRACE,
25 METHOD_OPTIONS,
26 METHOD_DELETE,
27
28 // RFC 3253
29 METHOD_CHECKOUT,
30 METHOD_CHECKIN,
31 METHOD_UNCHECKOUT,
32 METHOD_MKWORKSPACE,
33 METHOD_VERSION_CONTROL,
34 METHOD_REPORT,
35 METHOD_UPDATE,
36 METHOD_LABEL,
37 METHOD_MERGE,
38 METHOD_BASELINE_CONTROL,
39 METHOD_MKACTIVITY,
40
41 #if NO_SPECIAL_HANDLING
42 // RFC 3648
43 METHOD_ORDERPATCH,
44
45 // RFC 3744
46 METHOD_ACL,
47
48 // RFC 4437
49 METHOD_MKREDIRECTREF,
50 METHOD_UPDATEREDIRECTREF,
51
52 // RFC 4791
53 METHOD_MKCALENDAR,
54 #endif
55
56 // RFC 4918 (WebDAV)
57 METHOD_PROPFIND,
58 METHOD_PROPPATCH,
59 METHOD_MKCOL,
60 METHOD_COPY,
61 METHOD_MOVE,
62 METHOD_LOCK,
63 METHOD_UNLOCK,
64
65 // RFC 5323
66 METHOD_SEARCH,
67
68 #if NO_SPECIAL_HANDLING
69 // RFC 5789
70 METHOD_PATCH,
71
72 // RFC 5842
73 METHOD_BIND,
74 METHOD_REBIND,
75 METHOD_UNBIND,
76 #endif
77
78 // Squid extension methods
79 METHOD_PURGE,
80 METHOD_OTHER,
81 METHOD_ENUM_END // MUST be last, (yuck) this is used as an array-initialization index constant!
82 } MethodType;
83
84 extern const char *MethodType_str[];
85
86 inline const char*
87 MethodStr(const MethodType m)
88 {
89 return MethodType_str[m];
90 }
91
92 }; // namespace Http
93
94 #endif /* SQUID_SRC_HTTP_METHODTYPE_H */