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