]> git.ipfire.org Git - thirdparty/squid.git/blame - src/http/MethodType.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / http / MethodType.h
CommitLineData
bbc27441 1/*
f70aedc4 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
bbc27441
AJ
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
65e41a45 12#include "sbuf/SBuf.h"
7f06a3d8 13
c2a7cefd
AJ
14namespace 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
21typedef 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
c27e1e37 90 // RFC 7540
5d1a9afc
AJ
91 METHOD_PRI,
92
c2a7cefd
AJ
93 // Squid extension methods
94 METHOD_PURGE,
95 METHOD_OTHER,
96 METHOD_ENUM_END // MUST be last, (yuck) this is used as an array-initialization index constant!
97} MethodType;
98
7f06a3d8 99extern const SBuf MethodType_sb[];
c2a7cefd 100
7f06a3d8 101inline const SBuf &
c2a7cefd
AJ
102MethodStr(const MethodType m)
103{
7f06a3d8 104 return MethodType_sb[m];
c2a7cefd
AJ
105}
106
107}; // namespace Http
108
109#endif /* SQUID_SRC_HTTP_METHODTYPE_H */
f53969cc 110