]>
Commit | Line | Data |
---|---|---|
bbc27441 AJ |
1 | /* |
2 | * Copyright (C) 1996-2014 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 | ||
c2a7cefd AJ |
9 | #ifndef SQUID_SRC_HTTP_METHODTYPE_H |
10 | #define SQUID_SRC_HTTP_METHODTYPE_H | |
11 | ||
7f06a3d8 AJ |
12 | #include "SBuf.h" |
13 | ||
c2a7cefd AJ |
14 | namespace Http |
15 | { | |
16 | ||
c6cdf6b3 AJ |
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 | */ | |
c2a7cefd AJ |
21 | typedef enum _method_t { |
22 | METHOD_NONE = 0, | |
23 | ||
c2a7cefd AJ |
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 | ||
7f06a3d8 AJ |
34 | #if NO_SPECIAL_HANDLING |
35 | // RFC 2068 | |
36 | METHOD_LINK, | |
37 | METHOD_UNLINK, | |
38 | #endif | |
39 | ||
c2a7cefd AJ |
40 | // RFC 3253 |
41 | METHOD_CHECKOUT, | |
42 | METHOD_CHECKIN, | |
43 | METHOD_UNCHECKOUT, | |
44 | METHOD_MKWORKSPACE, | |
45 | METHOD_VERSION_CONTROL, | |
46 | METHOD_REPORT, | |
47 | METHOD_UPDATE, | |
48 | METHOD_LABEL, | |
49 | METHOD_MERGE, | |
50 | METHOD_BASELINE_CONTROL, | |
51 | METHOD_MKACTIVITY, | |
52 | ||
53 | #if NO_SPECIAL_HANDLING | |
54 | // RFC 3648 | |
55 | METHOD_ORDERPATCH, | |
56 | ||
57 | // RFC 3744 | |
58 | METHOD_ACL, | |
59 | ||
60 | // RFC 4437 | |
61 | METHOD_MKREDIRECTREF, | |
62 | METHOD_UPDATEREDIRECTREF, | |
63 | ||
64 | // RFC 4791 | |
65 | METHOD_MKCALENDAR, | |
66 | #endif | |
67 | ||
68 | // RFC 4918 (WebDAV) | |
69 | METHOD_PROPFIND, | |
70 | METHOD_PROPPATCH, | |
71 | METHOD_MKCOL, | |
72 | METHOD_COPY, | |
73 | METHOD_MOVE, | |
74 | METHOD_LOCK, | |
75 | METHOD_UNLOCK, | |
76 | ||
77 | // RFC 5323 | |
78 | METHOD_SEARCH, | |
79 | ||
80 | #if NO_SPECIAL_HANDLING | |
81 | // RFC 5789 | |
82 | METHOD_PATCH, | |
83 | ||
84 | // RFC 5842 | |
85 | METHOD_BIND, | |
86 | METHOD_REBIND, | |
87 | METHOD_UNBIND, | |
88 | #endif | |
89 | ||
90 | // Squid extension methods | |
91 | METHOD_PURGE, | |
92 | METHOD_OTHER, | |
93 | METHOD_ENUM_END // MUST be last, (yuck) this is used as an array-initialization index constant! | |
94 | } MethodType; | |
95 | ||
7f06a3d8 | 96 | extern const SBuf MethodType_sb[]; |
c2a7cefd | 97 | |
7f06a3d8 | 98 | inline const SBuf & |
c2a7cefd AJ |
99 | MethodStr(const MethodType m) |
100 | { | |
7f06a3d8 | 101 | return MethodType_sb[m]; |
c2a7cefd AJ |
102 | } |
103 | ||
104 | }; // namespace Http | |
105 | ||
106 | #endif /* SQUID_SRC_HTTP_METHODTYPE_H */ |