Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wang Fan <fan.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
MdeModulePkg/Include/Library/HttpLib.h | 5 +++--
MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 11 ++++++-----
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/MdeModulePkg/Include/Library/HttpLib.h b/MdeModulePkg/Include/Library/HttpLib.h
index 88b56ae..285a831 100644
--- a/MdeModulePkg/Include/Library/HttpLib.h
+++ b/MdeModulePkg/Include/Library/HttpLib.h
@@ -284,12 +284,13 @@ HttpInitMsgParser (
@param[in] BodyLength Length in bytes of the Body.
@param[in] Body Pointer to the buffer of the message-body to be parsed.
@retval EFI_SUCCESS Successfully parse the message-body.
@retval EFI_INVALID_PARAMETER MsgParser is NULL or Body is NULL or BodyLength is 0.
- @retval Others Operation aborted.
-
+ @retval EFI_ABORTED Operation aborted.
+ @retval Other Error happened while parsing message body.
+
**/
EFI_STATUS
EFIAPI
HttpParseMessageBody (
IN OUT VOID *MsgParser,
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
index 38ded5d..327ca9e 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
@@ -152,11 +152,11 @@ NetHttpParseAuthorityChar (
@param[in] Url The pointer to a HTTP URL string.
@param[in] FoundAt TRUE if there is an at sign ('@') in the authority component.
@param[in, out] UrlParser Pointer to the buffer of the parse result.
@retval EFI_SUCCESS Successfully parse the authority.
- @retval Other Error happened.
+ @retval EFI_INVALID_PARAMETER The Url is invalid to parse the authority component.
**/
EFI_STATUS
NetHttpParseAuthority (
IN CHAR8 *Url,
@@ -569,11 +569,11 @@ HttpUrlGetIp4 (
}
Parser = (HTTP_URL_PARSER*) UrlParser;
if ((Parser->FieldBitMap & BIT (HTTP_URI_FIELD_HOST)) == 0) {
- return EFI_INVALID_PARAMETER;
+ return EFI_NOT_FOUND;
}
Ip4String = AllocatePool (Parser->FieldData[HTTP_URI_FIELD_HOST].Length + 1);
if (Ip4String == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -632,11 +632,11 @@ HttpUrlGetIp6 (
}
Parser = (HTTP_URL_PARSER*) UrlParser;
if ((Parser->FieldBitMap & BIT (HTTP_URI_FIELD_HOST)) == 0) {
- return EFI_INVALID_PARAMETER;
+ return EFI_NOT_FOUND;
}
//
// IP-literal = "[" ( IPv6address / IPvFuture ) "]"
//
@@ -711,11 +711,11 @@ HttpUrlGetPort (
Index = 0;
Parser = (HTTP_URL_PARSER*) UrlParser;
if ((Parser->FieldBitMap & BIT (HTTP_URI_FIELD_PORT)) == 0) {
- return EFI_INVALID_PARAMETER;
+ return EFI_NOT_FOUND;
}
PortString = AllocatePool (Parser->FieldData[HTTP_URI_FIELD_PORT].Length + 1);
if (PortString == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -1130,11 +1130,12 @@ HttpInitMsgParser (
@param[in] BodyLength Length in bytes of the Body.
@param[in] Body Pointer to the buffer of the message-body to be parsed.
@retval EFI_SUCCESS Successfully parse the message-body.
@retval EFI_INVALID_PARAMETER MsgParser is NULL or Body is NULL or BodyLength is 0.
- @retval Others Operation aborted.
+ @retval EFI_ABORTED Operation aborted.
+ @retval Other Error happened while parsing message body.
**/
EFI_STATUS
EFIAPI
HttpParseMessageBody (
--
1.9.5.msysgit.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel