]> git.ipfire.org Git - thirdparty/squid.git/blob - src/http/MethodType.h
Source Format Enforcement (#963)
[thirdparty/squid.git] / src / http / MethodType.h
1 /*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_SRC_HTTP_METHODTYPE_H
10 #define SQUID_SRC_HTTP_METHODTYPE_H
11
12 #include "sbuf/SBuf.h"
13
14 namespace Http
15 {
16
17 /*
18 * The IANA registry for HTTP status codes can be found at:
19 * http://www.iana.org/assignments/http-methods/http-methods.xhtml
20 */
21 typedef enum _method_t {
22 METHOD_NONE = 0,
23
24 // RFC 2616 (HTTP)
25 METHOD_GET,
26 METHOD_POST,
27 METHOD_PUT,
28 METHOD_HEAD,
29 METHOD_CONNECT,
30 METHOD_TRACE,
31 METHOD_OPTIONS,
32 METHOD_DELETE,
33
34 // RFC 2068
35 METHOD_LINK,
36 METHOD_UNLINK,
37
38 // RFC 3253
39 METHOD_CHECKOUT,
40 METHOD_CHECKIN,
41 METHOD_UNCHECKOUT,
42 METHOD_MKWORKSPACE,
43 METHOD_VERSION_CONTROL,
44 METHOD_REPORT,
45 METHOD_UPDATE,
46 METHOD_LABEL,
47 METHOD_MERGE,
48 METHOD_BASELINE_CONTROL,
49 METHOD_MKACTIVITY,
50
51 #if NO_SPECIAL_HANDLING
52 // RFC 3648
53 METHOD_ORDERPATCH,
54
55 // RFC 3744
56 METHOD_ACL,
57
58 // RFC 4437
59 METHOD_MKREDIRECTREF,
60 METHOD_UPDATEREDIRECTREF,
61
62 // RFC 4791
63 METHOD_MKCALENDAR,
64 #endif
65
66 // RFC 4918 (WebDAV)
67 METHOD_PROPFIND,
68 METHOD_PROPPATCH,
69 METHOD_MKCOL,
70 METHOD_COPY,
71 METHOD_MOVE,
72 METHOD_LOCK,
73 METHOD_UNLOCK,
74
75 // RFC 5323
76 METHOD_SEARCH,
77
78 #if NO_SPECIAL_HANDLING
79 // RFC 5789
80 METHOD_PATCH,
81
82 // RFC 5842
83 METHOD_BIND,
84 METHOD_REBIND,
85 METHOD_UNBIND,
86 #endif
87
88 // RFC 7540
89 METHOD_PRI,
90
91 // Squid extension methods
92 METHOD_PURGE,
93 METHOD_OTHER,
94 METHOD_ENUM_END // MUST be last, (yuck) this is used as an array-initialization index constant!
95 } MethodType;
96
97 extern const SBuf MethodType_sb[];
98
99 inline const SBuf &
100 MethodStr(const MethodType m)
101 {
102 return MethodType_sb[m];
103 }
104
105 }; // namespace Http
106
107 #endif /* SQUID_SRC_HTTP_METHODTYPE_H */
108