]>
Commit | Line | Data |
---|---|---|
4ee9d531 | 1 | /** @file\r |
9095d37b LG |
2 | Hypertext Transfer Protocol -- HTTP/1.1 Standard definitions, from RFC 2616\r |
3 | \r | |
4 | This file contains common HTTP 1.1 definitions from RFC 2616\r | |
4ee9d531 | 5 | \r |
015ebfdc | 6 | (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r |
9344f092 | 7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
4ee9d531 SEHM |
8 | **/\r |
9 | \r | |
10 | #ifndef __HTTP_11_H__\r | |
11 | #define __HTTP_11_H__\r | |
12 | \r | |
13 | #pragma pack(1)\r | |
14 | \r | |
15 | ///\r | |
16 | /// HTTP Version (currently HTTP 1.1)\r | |
9095d37b | 17 | ///\r |
4ee9d531 SEHM |
18 | /// The version of an HTTP message is indicated by an HTTP-Version field\r |
19 | /// in the first line of the message.\r | |
20 | ///\r | |
21 | #define HTTP_VERSION "HTTP/1.1"\r | |
22 | \r | |
4ee9d531 SEHM |
23 | ///\r |
24 | /// HTTP Request Method definitions\r | |
9095d37b | 25 | ///\r |
4ee9d531 SEHM |
26 | /// The Method token indicates the method to be performed on the\r |
27 | /// resource identified by the Request-URI. The method is case-sensitive.\r | |
28 | ///\r | |
29 | #define HTTP_METHOD_OPTIONS "OPTIONS"\r | |
30 | #define HTTP_METHOD_GET "GET"\r | |
31 | #define HTTP_METHOD_HEAD "HEAD"\r | |
32 | #define HTTP_METHOD_POST "POST"\r | |
33 | #define HTTP_METHOD_PUT "PUT"\r | |
34 | #define HTTP_METHOD_DELETE "DELETE"\r | |
35 | #define HTTP_METHOD_TRACE "TRACE"\r | |
36 | #define HTTP_METHOD_CONNECT "CONNECT"\r | |
37 | #define HTTP_METHOD_PATCH "PATCH"\r | |
38 | \r | |
015ebfdc SEHM |
39 | ///\r |
40 | /// Connect method has maximum length according to EFI_HTTP_METHOD defined in\r | |
41 | /// UEFI2.5 spec so use this.\r | |
42 | ///\r | |
43 | #define HTTP_METHOD_MAXIMUM_LEN sizeof (HTTP_METHOD_CONNECT)\r | |
4ee9d531 SEHM |
44 | \r |
45 | ///\r | |
46 | /// Accept Request Header\r | |
9095d37b LG |
47 | /// The Accept request-header field can be used to specify certain media types which are\r |
48 | /// acceptable for the response. Accept headers can be used to indicate that the request\r | |
49 | /// is specifically limited to a small set of desired types, as in the case of a request\r | |
4ee9d531 SEHM |
50 | /// for an in-line image.\r |
51 | ///\r | |
52 | #define HTTP_HEADER_ACCEPT "Accept"\r | |
53 | \r | |
54 | \r | |
9095d37b | 55 | ///\r |
4ee9d531 | 56 | /// Accept-Charset Request Header\r |
9095d37b LG |
57 | /// The Accept-Charset request-header field can be used to indicate what character sets\r |
58 | /// are acceptable for the response. This field allows clients capable of understanding\r | |
59 | /// more comprehensive or special-purpose character sets to signal that capability to a\r | |
4ee9d531 SEHM |
60 | /// server which is capable of representing documents in those character sets.\r |
61 | ///\r | |
62 | #define HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"\r | |
63 | \r | |
9095d37b | 64 | ///\r |
4ee9d531 | 65 | /// Accept-Language Request Header\r |
9095d37b LG |
66 | /// The Accept-Language request-header field is similar to Accept,\r |
67 | /// but restricts the set of natural languages that are preferred\r | |
4ee9d531 SEHM |
68 | /// as a response to the request.\r |
69 | ///\r | |
70 | #define HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"\r | |
71 | \r | |
72 | ///\r | |
73 | /// Accept-Ranges Request Header\r | |
74 | /// The Accept-Ranges response-header field allows the server to\r | |
75 | /// indicate its acceptance of range requests for a resource:\r | |
76 | ///\r | |
77 | #define HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges"\r | |
78 | \r | |
79 | \r | |
9095d37b | 80 | ///\r |
4ee9d531 | 81 | /// Accept-Encoding Request Header\r |
9095d37b | 82 | /// The Accept-Encoding request-header field is similar to Accept,\r |
4ee9d531 SEHM |
83 | /// but restricts the content-codings that are acceptable in the response.\r |
84 | ///\r | |
85 | #define HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"\r | |
86 | \r | |
87 | ///\r | |
88 | /// Content-Encoding Header\r | |
9095d37b LG |
89 | /// The Content-Encoding entity-header field is used as a modifier to the media-type.\r |
90 | /// When present, its value indicates what additional content codings have been applied\r | |
91 | /// to the entity-body, and thus what decoding mechanisms must be applied in order to\r | |
92 | /// obtain the media-type referenced by the Content-Type header field. Content-Encoding\r | |
93 | /// is primarily used to allow a document to be compressed without losing the identity\r | |
4ee9d531 SEHM |
94 | /// of its underlying media type.\r |
95 | ///\r | |
96 | #define HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"\r | |
97 | \r | |
9095d37b | 98 | ///\r |
4ee9d531 SEHM |
99 | /// HTTP Content-Encoding Compression types\r |
100 | ///\r | |
101 | \r | |
102 | #define HTTP_CONTENT_ENCODING_IDENTITY "identity" /// No transformation is used. This is the default value for content coding.\r | |
103 | #define HTTP_CONTENT_ENCODING_GZIP "gzip" /// Content-Encoding: GNU zip format (described in RFC 1952).\r | |
9095d37b LG |
104 | #define HTTP_CONTENT_ENCODING_COMPRESS "compress" /// encoding format produced by the common UNIX file compression program "compress".\r |
105 | #define HTTP_CONTENT_ENCODING_DEFLATE "deflate" /// The "zlib" format defined in RFC 1950 in combination with the "deflate"\r | |
015ebfdc | 106 | /// compression mechanism described in RFC 1951.\r |
4ee9d531 SEHM |
107 | \r |
108 | \r | |
109 | ///\r | |
110 | /// Content-Type Header\r | |
9095d37b LG |
111 | /// The Content-Type entity-header field indicates the media type of the entity-body sent to\r |
112 | /// the recipient or, in the case of the HEAD method, the media type that would have been sent\r | |
4ee9d531 SEHM |
113 | /// had the request been a GET.\r |
114 | ///\r | |
115 | #define HTTP_HEADER_CONTENT_TYPE "Content-Type"\r | |
116 | //\r | |
117 | // Common Media Types defined in http://www.iana.org/assignments/media-types/media-types.xhtml\r | |
118 | //\r | |
119 | #define HTTP_CONTENT_TYPE_APP_JSON "application/json"\r | |
120 | #define HTTP_CONTENT_TYPE_APP_OCTET_STREAM "application/octet-stream"\r | |
9095d37b | 121 | \r |
4ee9d531 SEHM |
122 | #define HTTP_CONTENT_TYPE_TEXT_HTML "text/html"\r |
123 | #define HTTP_CONTENT_TYPE_TEXT_PLAIN "text/plain"\r | |
124 | #define HTTP_CONTENT_TYPE_TEXT_CSS "text/css"\r | |
125 | #define HTTP_CONTENT_TYPE_TEXT_XML "text/xml"\r | |
9095d37b | 126 | \r |
4ee9d531 SEHM |
127 | #define HTTP_CONTENT_TYPE_IMAGE_GIF "image/gif"\r |
128 | #define HTTP_CONTENT_TYPE_IMAGE_JPEG "image/jpeg"\r | |
129 | #define HTTP_CONTENT_TYPE_IMAGE_PNG "image/png"\r | |
130 | #define HTTP_CONTENT_TYPE_IMAGE_SVG_XML "image/svg+xml"\r | |
131 | \r | |
132 | \r | |
133 | ///\r | |
134 | /// Content-Length Header\r | |
9095d37b LG |
135 | /// The Content-Length entity-header field indicates the size of the entity-body,\r |
136 | /// in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD\r | |
4ee9d531 SEHM |
137 | /// method, the size of the entity-body that would have been sent had the request been a GET.\r |
138 | ///\r | |
139 | #define HTTP_HEADER_CONTENT_LENGTH "Content-Length"\r | |
9095d37b | 140 | \r |
4ee9d531 SEHM |
141 | ///\r |
142 | /// Transfer-Encoding Header\r | |
9095d37b LG |
143 | /// The Transfer-Encoding general-header field indicates what (if any) type of transformation\r |
144 | /// has been applied to the message body in order to safely transfer it between the sender\r | |
145 | /// and the recipient. This differs from the content-coding in that the transfer-coding\r | |
4ee9d531 SEHM |
146 | /// is a property of the message, not of the entity.\r |
147 | ///\r | |
148 | #define HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"\r | |
a7d97704 AC |
149 | #define HTTP_HEADER_TRANSFER_ENCODING_CHUNKED "chunked"\r |
150 | #define CHUNKED_TRNASFER_CODING_CR '\r'\r | |
151 | #define CHUNKED_TRNASFER_CODING_LF '\n'\r | |
152 | #define CHUNKED_TRNASFER_CODING_LAST_CHUNK '0'\r | |
153 | #define CHUNKED_TRNASFER_CODING_EXTENSION_SAPERATOR ';'\r | |
4ee9d531 | 154 | \r |
015ebfdc SEHM |
155 | ///\r |
156 | /// User Agent Request Header\r | |
9095d37b LG |
157 | ///\r |
158 | /// The User-Agent request-header field contains information about the user agent originating\r | |
159 | /// the request. This is for statistical purposes, the tracing of protocol violations, and\r | |
160 | /// automated recognition of user agents for the sake of tailoring responses to avoid\r | |
161 | /// particular user agent limitations. User agents SHOULD include this field with requests.\r | |
162 | /// The field can contain multiple product tokens and comments identifying the agent and any\r | |
163 | /// subproducts which form a significant part of the user agent.\r | |
164 | /// By convention, the product tokens are listed in order of their significance for\r | |
015ebfdc SEHM |
165 | /// identifying the application.\r |
166 | ///\r | |
167 | #define HTTP_HEADER_USER_AGENT "User-Agent"\r | |
168 | \r | |
4ee9d531 SEHM |
169 | ///\r |
170 | /// Host Request Header\r | |
171 | ///\r | |
9095d37b LG |
172 | /// The Host request-header field specifies the Internet host and port number of the resource\r |
173 | /// being requested, as obtained from the original URI given by the user or referring resource\r | |
4ee9d531 | 174 | ///\r |
015ebfdc | 175 | #define HTTP_HEADER_HOST "Host"\r |
4ee9d531 | 176 | \r |
015ebfdc SEHM |
177 | ///\r |
178 | /// Location Response Header\r | |
9095d37b LG |
179 | ///\r |
180 | /// The Location response-header field is used to redirect the recipient to a location other than\r | |
181 | /// the Request-URI for completion of the request or identification of a new resource.\r | |
182 | /// For 201 (Created) responses, the Location is that of the new resource which was created by\r | |
183 | /// the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for\r | |
015ebfdc SEHM |
184 | /// automatic redirection to the resource. The field value consists of a single absolute URI.\r |
185 | ///\r | |
186 | #define HTTP_HEADER_LOCATION "Location"\r | |
4ee9d531 SEHM |
187 | \r |
188 | ///\r | |
189 | /// The If-Match request-header field is used with a method to make it conditional.\r | |
9095d37b LG |
190 | /// A client that has one or more entities previously obtained from the resource\r |
191 | /// can verify that one of those entities is current by including a list of their\r | |
192 | /// associated entity tags in the If-Match header field.\r | |
193 | /// The purpose of this feature is to allow efficient updates of cached information\r | |
194 | /// with a minimum amount of transaction overhead. It is also used, on updating requests,\r | |
195 | /// to prevent inadvertent modification of the wrong version of a resource.\r | |
4ee9d531 SEHM |
196 | /// As a special case, the value "*" matches any current entity of the resource.\r |
197 | ///\r | |
015ebfdc | 198 | #define HTTP_HEADER_IF_MATCH "If-Match"\r |
4ee9d531 SEHM |
199 | \r |
200 | \r | |
201 | ///\r | |
9095d37b LG |
202 | /// The If-None-Match request-header field is used with a method to make it conditional.\r |
203 | /// A client that has one or more entities previously obtained from the resource can verify\r | |
204 | /// that none of those entities is current by including a list of their associated entity\r | |
205 | /// tags in the If-None-Match header field. The purpose of this feature is to allow efficient\r | |
206 | /// updates of cached information with a minimum amount of transaction overhead. It is also used\r | |
207 | /// to prevent a method (e.g. PUT) from inadvertently modifying an existing resource when the\r | |
4ee9d531 SEHM |
208 | /// client believes that the resource does not exist.\r |
209 | ///\r | |
015ebfdc | 210 | #define HTTP_HEADER_IF_NONE_MATCH "If-None-Match"\r |
4ee9d531 SEHM |
211 | \r |
212 | \r | |
213 | \r | |
9095d37b | 214 | ///\r |
4ee9d531 SEHM |
215 | /// Authorization Request Header\r |
216 | /// The Authorization field value consists of credentials\r | |
217 | /// containing the authentication information of the user agent for\r | |
218 | /// the realm of the resource being requested.\r | |
219 | ///\r | |
015ebfdc | 220 | #define HTTP_HEADER_AUTHORIZATION "Authorization"\r |
4ee9d531 SEHM |
221 | \r |
222 | ///\r | |
223 | /// ETAG Response Header\r | |
9095d37b LG |
224 | /// The ETag response-header field provides the current value of the entity tag\r |
225 | /// for the requested variant.\r | |
4ee9d531 | 226 | ///\r |
015ebfdc | 227 | #define HTTP_HEADER_ETAG "ETag"\r |
4ee9d531 | 228 | \r |
015ebfdc SEHM |
229 | ///\r |
230 | /// Custom header field checked by the iLO web server to\r | |
231 | /// specify a client session key.\r | |
232 | /// Example: X-Auth-Token: 24de6b1f8fa147ad59f6452def628798\r | |
233 | ///\r | |
234 | #define HTTP_HEADER_X_AUTH_TOKEN "X-Auth-Token"\r | |
4ee9d531 | 235 | \r |
2c1c50fc NH |
236 | ///\r |
237 | /// Expect Header\r | |
238 | /// The "Expect" header field in a request indicates a certain set of\r | |
239 | /// behaviors (expectations) that need to be supported by the server in\r | |
240 | /// order to properly handle this request. The only such expectation\r | |
241 | /// defined by this specification is 100-continue.\r | |
242 | ///\r | |
243 | #define HTTP_HEADER_EXPECT "Expect"\r | |
244 | \r | |
245 | ///\r | |
246 | /// Expect Header Value\r | |
247 | ///\r | |
248 | #define HTTP_EXPECT_100_CONTINUE "100-continue"\r | |
249 | \r | |
4ee9d531 | 250 | #pragma pack()\r |
015ebfdc | 251 | \r |
4ee9d531 | 252 | #endif\r |