Apache2
ajp_header.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
25 #ifndef AJP_HEADER_H
26 #define AJP_HEADER_H
27 
28 /*
29  * Conditional request attributes
30  *
31  */
32 #define SC_A_CONTEXT (unsigned char)1
33 #define SC_A_SERVLET_PATH (unsigned char)2
34 #define SC_A_REMOTE_USER (unsigned char)3
35 #define SC_A_AUTH_TYPE (unsigned char)4
36 #define SC_A_QUERY_STRING (unsigned char)5
37 #define SC_A_JVM_ROUTE (unsigned char)6
38 #define SC_A_SSL_CERT (unsigned char)7
39 #define SC_A_SSL_CIPHER (unsigned char)8
40 #define SC_A_SSL_SESSION (unsigned char)9
41 #define SC_A_REQ_ATTRIBUTE (unsigned char)10
42 #define SC_A_SSL_KEY_SIZE (unsigned char)11 /* only in if JkOptions +ForwardKeySize */
43 #define SC_A_SECRET (unsigned char)12
44 #define SC_A_STORED_METHOD (unsigned char)13
45 #define SC_A_ARE_DONE (unsigned char)0xFF
46 
47 /*
48  * AJP private request attributes
49  *
50  * The following request attribute is recognized by Tomcat
51  * to contain the SSL protocol name
52  */
53 #define SC_A_SSL_PROTOCOL ("AJP_SSL_PROTOCOL")
54 /*
55  * The following request attribute is recognized by Tomcat
56  * to contain the forwarded remote port.
57  */
58 #define SC_A_REQ_REMOTE_PORT ("AJP_REMOTE_PORT")
59 /*
60  * The following request attribute is recognized by Tomcat
61  * to contain the forwarded local ip address.
62  */
63 #define SC_A_REQ_LOCAL_ADDR ("AJP_LOCAL_ADDR")
64 
65 /*
66  * Request methods, coded as numbers instead of strings.
67  * The list of methods was taken from Section 5.1.1 of RFC 2616,
68  * RFC 2518, the ACL IETF draft, and the DeltaV IESG Proposed Standard.
69  * Method = "OPTIONS"
70  * | "GET"
71  * | "HEAD"
72  * | "POST"
73  * | "PUT"
74  * | "DELETE"
75  * | "TRACE"
76  * | "PROPFIND"
77  * | "PROPPATCH"
78  * | "MKCOL"
79  * | "COPY"
80  * | "MOVE"
81  * | "LOCK"
82  * | "UNLOCK"
83  * | "ACL"
84  * | "REPORT"
85  * | "VERSION-CONTROL"
86  * | "CHECKIN"
87  * | "CHECKOUT"
88  * | "UNCHECKOUT"
89  * | "SEARCH"
90  * | "MKWORKSPACE"
91  * | "UPDATE"
92  * | "LABEL"
93  * | "MERGE"
94  * | "BASELINE-CONTROL"
95  * | "MKACTIVITY"
96  *
97  */
98 #define SC_M_OPTIONS (unsigned char)1
99 #define SC_M_GET (unsigned char)2
100 #define SC_M_HEAD (unsigned char)3
101 #define SC_M_POST (unsigned char)4
102 #define SC_M_PUT (unsigned char)5
103 #define SC_M_DELETE (unsigned char)6
104 #define SC_M_TRACE (unsigned char)7
105 #define SC_M_PROPFIND (unsigned char)8
106 #define SC_M_PROPPATCH (unsigned char)9
107 #define SC_M_MKCOL (unsigned char)10
108 #define SC_M_COPY (unsigned char)11
109 #define SC_M_MOVE (unsigned char)12
110 #define SC_M_LOCK (unsigned char)13
111 #define SC_M_UNLOCK (unsigned char)14
112 #define SC_M_ACL (unsigned char)15
113 #define SC_M_REPORT (unsigned char)16
114 #define SC_M_VERSION_CONTROL (unsigned char)17
115 #define SC_M_CHECKIN (unsigned char)18
116 #define SC_M_CHECKOUT (unsigned char)19
117 #define SC_M_UNCHECKOUT (unsigned char)20
118 #define SC_M_SEARCH (unsigned char)21
119 #define SC_M_MKWORKSPACE (unsigned char)22
120 #define SC_M_UPDATE (unsigned char)23
121 #define SC_M_LABEL (unsigned char)24
122 #define SC_M_MERGE (unsigned char)25
123 #define SC_M_BASELINE_CONTROL (unsigned char)26
124 #define SC_M_MKACTIVITY (unsigned char)27
125 #define SC_M_JK_STORED (unsigned char)0xFF
126 
127 
128 /*
129  * Frequent request headers, these headers are coded as numbers
130  * instead of strings.
131  *
132  * Accept
133  * Accept-Charset
134  * Accept-Encoding
135  * Accept-Language
136  * Authorization
137  * Connection
138  * Content-Type
139  * Content-Length
140  * Cookie
141  * Cookie2
142  * Host
143  * Pragma
144  * Referer
145  * User-Agent
146  *
147  */
148 
149 #define SC_ACCEPT (unsigned short)0xA001
150 #define SC_ACCEPT_CHARSET (unsigned short)0xA002
151 #define SC_ACCEPT_ENCODING (unsigned short)0xA003
152 #define SC_ACCEPT_LANGUAGE (unsigned short)0xA004
153 #define SC_AUTHORIZATION (unsigned short)0xA005
154 #define SC_CONNECTION (unsigned short)0xA006
155 #define SC_CONTENT_TYPE (unsigned short)0xA007
156 #define SC_CONTENT_LENGTH (unsigned short)0xA008
157 #define SC_COOKIE (unsigned short)0xA009
158 #define SC_COOKIE2 (unsigned short)0xA00A
159 #define SC_HOST (unsigned short)0xA00B
160 #define SC_PRAGMA (unsigned short)0xA00C
161 #define SC_REFERER (unsigned short)0xA00D
162 #define SC_USER_AGENT (unsigned short)0xA00E
163 
164 /*
165  * Frequent response headers, these headers are coded as numbers
166  * instead of strings.
167  *
168  * Content-Type
169  * Content-Language
170  * Content-Length
171  * Date
172  * Last-Modified
173  * Location
174  * Set-Cookie
175  * Servlet-Engine
176  * Status
177  * WWW-Authenticate
178  *
179  */
180 
181 #define SC_RESP_CONTENT_TYPE (unsigned short)0xA001
182 #define SC_RESP_CONTENT_LANGUAGE (unsigned short)0xA002
183 #define SC_RESP_CONTENT_LENGTH (unsigned short)0xA003
184 #define SC_RESP_DATE (unsigned short)0xA004
185 #define SC_RESP_LAST_MODIFIED (unsigned short)0xA005
186 #define SC_RESP_LOCATION (unsigned short)0xA006
187 #define SC_RESP_SET_COOKIE (unsigned short)0xA007
188 #define SC_RESP_SET_COOKIE2 (unsigned short)0xA008
189 #define SC_RESP_SERVLET_ENGINE (unsigned short)0xA009
190 #define SC_RESP_STATUS (unsigned short)0xA00A
191 #define SC_RESP_WWW_AUTHENTICATE (unsigned short)0xA00B
192 #define SC_RES_HEADERS_NUM 11
193 
194 #endif /* AJP_HEADER_H */