]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/Http11.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / Http11.h
CommitLineData
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
2f88bd3a 21#define HTTP_VERSION "HTTP/1.1"\r
4ee9d531 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
2f88bd3a
MK
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
4ee9d531 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
2f88bd3a 52#define HTTP_HEADER_ACCEPT "Accept"\r
4ee9d531 53\r
9095d37b 54///\r
4ee9d531 55/// Accept-Charset Request Header\r
9095d37b
LG
56/// The Accept-Charset request-header field can be used to indicate what character sets\r
57/// are acceptable for the response. This field allows clients capable of understanding\r
58/// more comprehensive or special-purpose character sets to signal that capability to a\r
4ee9d531
SEHM
59/// server which is capable of representing documents in those character sets.\r
60///\r
2f88bd3a 61#define HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"\r
4ee9d531 62\r
9095d37b 63///\r
4ee9d531 64/// Accept-Language Request Header\r
9095d37b
LG
65/// The Accept-Language request-header field is similar to Accept,\r
66/// but restricts the set of natural languages that are preferred\r
4ee9d531
SEHM
67/// as a response to the request.\r
68///\r
2f88bd3a 69#define HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"\r
4ee9d531
SEHM
70\r
71///\r
72/// Accept-Ranges Request Header\r
73/// The Accept-Ranges response-header field allows the server to\r
74/// indicate its acceptance of range requests for a resource:\r
75///\r
2f88bd3a 76#define HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges"\r
4ee9d531 77\r
9095d37b 78///\r
4ee9d531 79/// Accept-Encoding Request Header\r
9095d37b 80/// The Accept-Encoding request-header field is similar to Accept,\r
4ee9d531
SEHM
81/// but restricts the content-codings that are acceptable in the response.\r
82///\r
2f88bd3a 83#define HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"\r
4ee9d531
SEHM
84\r
85///\r
86/// Content-Encoding Header\r
9095d37b
LG
87/// The Content-Encoding entity-header field is used as a modifier to the media-type.\r
88/// When present, its value indicates what additional content codings have been applied\r
89/// to the entity-body, and thus what decoding mechanisms must be applied in order to\r
90/// obtain the media-type referenced by the Content-Type header field. Content-Encoding\r
91/// is primarily used to allow a document to be compressed without losing the identity\r
4ee9d531
SEHM
92/// of its underlying media type.\r
93///\r
2f88bd3a 94#define HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"\r
4ee9d531 95\r
9095d37b 96///\r
4ee9d531
SEHM
97/// HTTP Content-Encoding Compression types\r
98///\r
99\r
2f88bd3a
MK
100#define HTTP_CONTENT_ENCODING_IDENTITY "identity" /// No transformation is used. This is the default value for content coding.\r
101#define HTTP_CONTENT_ENCODING_GZIP "gzip" /// Content-Encoding: GNU zip format (described in RFC 1952).\r
102#define HTTP_CONTENT_ENCODING_COMPRESS "compress" /// encoding format produced by the common UNIX file compression program "compress".\r
103#define HTTP_CONTENT_ENCODING_DEFLATE "deflate" /// The "zlib" format defined in RFC 1950 in combination with the "deflate"\r
015ebfdc 104 /// compression mechanism described in RFC 1951.\r
4ee9d531 105\r
4ee9d531
SEHM
106///\r
107/// Content-Type Header\r
9095d37b
LG
108/// The Content-Type entity-header field indicates the media type of the entity-body sent to\r
109/// the recipient or, in the case of the HEAD method, the media type that would have been sent\r
4ee9d531
SEHM
110/// had the request been a GET.\r
111///\r
2f88bd3a 112#define HTTP_HEADER_CONTENT_TYPE "Content-Type"\r
4ee9d531
SEHM
113//\r
114// Common Media Types defined in http://www.iana.org/assignments/media-types/media-types.xhtml\r
115//\r
116#define HTTP_CONTENT_TYPE_APP_JSON "application/json"\r
117#define HTTP_CONTENT_TYPE_APP_OCTET_STREAM "application/octet-stream"\r
9095d37b 118\r
2f88bd3a
MK
119#define HTTP_CONTENT_TYPE_TEXT_HTML "text/html"\r
120#define HTTP_CONTENT_TYPE_TEXT_PLAIN "text/plain"\r
121#define HTTP_CONTENT_TYPE_TEXT_CSS "text/css"\r
122#define HTTP_CONTENT_TYPE_TEXT_XML "text/xml"\r
4ee9d531 123\r
2f88bd3a
MK
124#define HTTP_CONTENT_TYPE_IMAGE_GIF "image/gif"\r
125#define HTTP_CONTENT_TYPE_IMAGE_JPEG "image/jpeg"\r
126#define HTTP_CONTENT_TYPE_IMAGE_PNG "image/png"\r
127#define HTTP_CONTENT_TYPE_IMAGE_SVG_XML "image/svg+xml"\r
4ee9d531
SEHM
128\r
129///\r
130/// Content-Length Header\r
9095d37b
LG
131/// The Content-Length entity-header field indicates the size of the entity-body,\r
132/// in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD\r
4ee9d531
SEHM
133/// method, the size of the entity-body that would have been sent had the request been a GET.\r
134///\r
2f88bd3a 135#define HTTP_HEADER_CONTENT_LENGTH "Content-Length"\r
9095d37b 136\r
4ee9d531
SEHM
137///\r
138/// Transfer-Encoding Header\r
9095d37b
LG
139/// The Transfer-Encoding general-header field indicates what (if any) type of transformation\r
140/// has been applied to the message body in order to safely transfer it between the sender\r
141/// and the recipient. This differs from the content-coding in that the transfer-coding\r
4ee9d531
SEHM
142/// is a property of the message, not of the entity.\r
143///\r
2f88bd3a
MK
144#define HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"\r
145#define HTTP_HEADER_TRANSFER_ENCODING_CHUNKED "chunked"\r
146#define CHUNKED_TRANSFER_CODING_CR '\r'\r
147#define CHUNKED_TRANSFER_CODING_LF '\n'\r
148#define CHUNKED_TRANSFER_CODING_LAST_CHUNK '0'\r
149#define CHUNKED_TRANSFER_CODING_EXTENSION_SEPARATOR ';'\r
4ee9d531 150\r
015ebfdc
SEHM
151///\r
152/// User Agent Request Header\r
9095d37b
LG
153///\r
154/// The User-Agent request-header field contains information about the user agent originating\r
155/// the request. This is for statistical purposes, the tracing of protocol violations, and\r
156/// automated recognition of user agents for the sake of tailoring responses to avoid\r
157/// particular user agent limitations. User agents SHOULD include this field with requests.\r
158/// The field can contain multiple product tokens and comments identifying the agent and any\r
159/// subproducts which form a significant part of the user agent.\r
160/// By convention, the product tokens are listed in order of their significance for\r
015ebfdc
SEHM
161/// identifying the application.\r
162///\r
2f88bd3a 163#define HTTP_HEADER_USER_AGENT "User-Agent"\r
015ebfdc 164\r
4ee9d531
SEHM
165///\r
166/// Host Request Header\r
167///\r
9095d37b
LG
168/// The Host request-header field specifies the Internet host and port number of the resource\r
169/// being requested, as obtained from the original URI given by the user or referring resource\r
4ee9d531 170///\r
2f88bd3a 171#define HTTP_HEADER_HOST "Host"\r
4ee9d531 172\r
015ebfdc
SEHM
173///\r
174/// Location Response Header\r
9095d37b
LG
175///\r
176/// The Location response-header field is used to redirect the recipient to a location other than\r
177/// the Request-URI for completion of the request or identification of a new resource.\r
178/// For 201 (Created) responses, the Location is that of the new resource which was created by\r
179/// the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for\r
015ebfdc
SEHM
180/// automatic redirection to the resource. The field value consists of a single absolute URI.\r
181///\r
2f88bd3a 182#define HTTP_HEADER_LOCATION "Location"\r
4ee9d531
SEHM
183\r
184///\r
185/// The If-Match request-header field is used with a method to make it conditional.\r
9095d37b
LG
186/// A client that has one or more entities previously obtained from the resource\r
187/// can verify that one of those entities is current by including a list of their\r
188/// associated entity tags in the If-Match header field.\r
189/// The purpose of this feature is to allow efficient updates of cached information\r
190/// with a minimum amount of transaction overhead. It is also used, on updating requests,\r
191/// to prevent inadvertent modification of the wrong version of a resource.\r
4ee9d531
SEHM
192/// As a special case, the value "*" matches any current entity of the resource.\r
193///\r
2f88bd3a 194#define HTTP_HEADER_IF_MATCH "If-Match"\r
4ee9d531
SEHM
195\r
196///\r
9095d37b
LG
197/// The If-None-Match request-header field is used with a method to make it conditional.\r
198/// A client that has one or more entities previously obtained from the resource can verify\r
199/// that none of those entities is current by including a list of their associated entity\r
200/// tags in the If-None-Match header field. The purpose of this feature is to allow efficient\r
201/// updates of cached information with a minimum amount of transaction overhead. It is also used\r
202/// to prevent a method (e.g. PUT) from inadvertently modifying an existing resource when the\r
4ee9d531
SEHM
203/// client believes that the resource does not exist.\r
204///\r
2f88bd3a 205#define HTTP_HEADER_IF_NONE_MATCH "If-None-Match"\r
4ee9d531 206\r
671b0cea
SK
207///\r
208/// The WWW-Authenticate Response Header\r
209/// If a server receives a request for an access-protected object, and an\r
210/// acceptable Authorization header is not sent, the server responds with\r
211/// a "401 Unauthorized" status code, and a WWW-Authenticate header.\r
212///\r
213#define HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"\r
214\r
9095d37b 215///\r
4ee9d531
SEHM
216/// Authorization Request Header\r
217/// The Authorization field value consists of credentials\r
218/// containing the authentication information of the user agent for\r
219/// the realm of the resource being requested.\r
220///\r
2f88bd3a 221#define HTTP_HEADER_AUTHORIZATION "Authorization"\r
4ee9d531
SEHM
222\r
223///\r
224/// ETAG Response Header\r
9095d37b
LG
225/// The ETag response-header field provides the current value of the entity tag\r
226/// for the requested variant.\r
4ee9d531 227///\r
2f88bd3a 228#define HTTP_HEADER_ETAG "ETag"\r
4ee9d531 229\r
015ebfdc
SEHM
230///\r
231/// Custom header field checked by the iLO web server to\r
232/// specify a client session key.\r
233/// Example: X-Auth-Token: 24de6b1f8fa147ad59f6452def628798\r
234///\r
2f88bd3a 235#define HTTP_HEADER_X_AUTH_TOKEN "X-Auth-Token"\r
4ee9d531 236\r
2c1c50fc
NH
237///\r
238/// Expect Header\r
239/// The "Expect" header field in a request indicates a certain set of\r
240/// behaviors (expectations) that need to be supported by the server in\r
241/// order to properly handle this request. The only such expectation\r
242/// defined by this specification is 100-continue.\r
243///\r
2f88bd3a 244#define HTTP_HEADER_EXPECT "Expect"\r
2c1c50fc
NH
245\r
246///\r
247/// Expect Header Value\r
248///\r
2f88bd3a 249#define HTTP_EXPECT_100_CONTINUE "100-continue"\r
2c1c50fc 250\r
4ee9d531 251#pragma pack()\r
015ebfdc 252\r
4ee9d531 253#endif\r