VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Http11.h@ 108794

Last change on this file since 108794 was 108794, checked in by vboxsync, 2 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette