This library is used to share code between UEFI network stack modules.\r
It provides the helper routines to parse the HTTP message byte stream.\r
\r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at<BR>\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
/**\r
Decode a percent-encoded URI component to the ASCII character.\r
- \r
- Decode the input component in Buffer according to RFC 3986. The caller is responsible to make \r
+\r
+ Decode the input component in Buffer according to RFC 3986. The caller is responsible to make\r
sure ResultBuffer points to a buffer with size equal or greater than ((AsciiStrSize (Buffer))\r
- in bytes. \r
+ in bytes.\r
\r
@param[in] Buffer The pointer to a percent-encoded URI component.\r
@param[in] BufferLength Length of Buffer in bytes.\r
\r
@retval EFI_SUCCESS Successfully decoded the URI.\r
@retval EFI_INVALID_PARAMETER Buffer is not a valid percent-encoded string.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
@retval EFI_SUCCESS Successfully dereferenced the HTTP URL.\r
@retval EFI_INVALID_PARAMETER UrlParser is NULL or Url is not a valid HTTP URL.\r
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
@retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid.\r
@retval EFI_NOT_FOUND No hostName component in the URL.\r
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
@retval EFI_INVALID_PARAMETER Uri is NULL or Ip4Address is NULL or UrlParser is invalid.\r
@retval EFI_NOT_FOUND No IPv4 address component in the URL.\r
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
@retval EFI_INVALID_PARAMETER Uri is NULL or Ip6Address is NULL or UrlParser is invalid.\r
@retval EFI_NOT_FOUND No IPv6 address component in the URL.\r
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
@retval EFI_INVALID_PARAMETER Uri is NULL or Port is NULL or UrlParser is invalid.\r
@retval EFI_NOT_FOUND No port number in the URL.\r
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
@retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid.\r
@retval EFI_NOT_FOUND No hostName component in the URL.\r
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
Release the resource of the URL parser.\r
\r
@param[in] UrlParser Pointer to the parser.\r
- \r
+\r
**/\r
VOID\r
EFIAPI\r
\r
@retval EFI_SUCCESS Continue to parser the message body.\r
@retval Others Abort the parse.\r
- \r
+\r
**/\r
typedef\r
EFI_STATUS\r
\r
@retval EFI_SUCCESS Successfully parse the message-body.\r
@retval EFI_INVALID_PARAMETER MsgParser is NULL or Body is NULL or BodyLength is 0.\r
- @retval Others Operation aborted.\r
+ @retval EFI_ABORTED Operation aborted.\r
+ @retval Other Error happened while parsing message body.\r
\r
**/\r
EFI_STATUS\r
@retval EFI_SUCCESS Successfully to get the entity length.\r
@retval EFI_NOT_READY Entity length is not valid yet.\r
@retval EFI_INVALID_PARAMETER MsgParser is NULL or ContentLength is NULL.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
Release the resource of the message parser.\r
\r
@param[in] MsgParser Pointer to the message parser.\r
- \r
+\r
**/\r
VOID\r
EFIAPI\r
NULL if any error occured.\r
@param[out] RequestMsgSize Size of the RequestMsg (in bytes).\r
\r
- @return EFI_SUCCESS If HTTP request string was created successfully\r
+ @retval EFI_SUCCESS If HTTP request string was created successfully.\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources.\r
- @retval EFI_INVALID_PARAMETER The input arguments are invalid\r
+ @retval EFI_INVALID_PARAMETER The input arguments are invalid.\r
\r
**/\r
EFI_STATUS\r