mirror of https://github.com/acidanthera/audk.git
MdePkg: Update Http11 with additional useful definitions
Add additional HTTP 1.1 definitions that are useful in HTTP applications, such as User-Agent, Location, and x-Auth-Token Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
parent
90f658c460
commit
015ebfdc90
|
@ -3,7 +3,7 @@
|
|||
|
||||
This file contains common HTTP 1.1 definitions from RFC 2616
|
||||
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -26,7 +26,6 @@
|
|||
///
|
||||
#define HTTP_VERSION "HTTP/1.1"
|
||||
|
||||
|
||||
///
|
||||
/// HTTP Request Method definitions
|
||||
///
|
||||
|
@ -43,7 +42,11 @@
|
|||
#define HTTP_METHOD_CONNECT "CONNECT"
|
||||
#define HTTP_METHOD_PATCH "PATCH"
|
||||
|
||||
#define HTTP_METHOD_MAXIMUM_LEN sizeof ("CONNECT")
|
||||
///
|
||||
/// Connect method has maximum length according to EFI_HTTP_METHOD defined in
|
||||
/// UEFI2.5 spec so use this.
|
||||
///
|
||||
#define HTTP_METHOD_MAXIMUM_LEN sizeof (HTTP_METHOD_CONNECT)
|
||||
|
||||
///
|
||||
/// Accept Request Header
|
||||
|
@ -151,6 +154,20 @@
|
|||
#define HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
|
||||
|
||||
|
||||
///
|
||||
/// User Agent Request Header
|
||||
///
|
||||
/// The User-Agent request-header field contains information about the user agent originating
|
||||
/// the request. This is for statistical purposes, the tracing of protocol violations, and
|
||||
/// automated recognition of user agents for the sake of tailoring responses to avoid
|
||||
/// particular user agent limitations. User agents SHOULD include this field with requests.
|
||||
/// The field can contain multiple product tokens and comments identifying the agent and any
|
||||
/// subproducts which form a significant part of the user agent.
|
||||
/// By convention, the product tokens are listed in order of their significance for
|
||||
/// identifying the application.
|
||||
///
|
||||
#define HTTP_HEADER_USER_AGENT "User-Agent"
|
||||
|
||||
///
|
||||
/// Host Request Header
|
||||
///
|
||||
|
@ -159,6 +176,16 @@
|
|||
///
|
||||
#define HTTP_HEADER_HOST "Host"
|
||||
|
||||
///
|
||||
/// Location Response Header
|
||||
///
|
||||
/// The Location response-header field is used to redirect the recipient to a location other than
|
||||
/// the Request-URI for completion of the request or identification of a new resource.
|
||||
/// For 201 (Created) responses, the Location is that of the new resource which was created by
|
||||
/// the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for
|
||||
/// automatic redirection to the resource. The field value consists of a single absolute URI.
|
||||
///
|
||||
#define HTTP_HEADER_LOCATION "Location"
|
||||
|
||||
///
|
||||
/// The If-Match request-header field is used with a method to make it conditional.
|
||||
|
@ -201,8 +228,13 @@
|
|||
///
|
||||
#define HTTP_HEADER_ETAG "ETag"
|
||||
|
||||
|
||||
|
||||
///
|
||||
/// Custom header field checked by the iLO web server to
|
||||
/// specify a client session key.
|
||||
/// Example: X-Auth-Token: 24de6b1f8fa147ad59f6452def628798
|
||||
///
|
||||
#define HTTP_HEADER_X_AUTH_TOKEN "X-Auth-Token"
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue