From 4a6f440f259d0fc12b49c49c48b93ad1198cbb86 Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Mon, 25 Dec 2017 16:57:28 +0800 Subject: [PATCH] MdeModulePkg/DxeHttpLib: Correct some return Status. Cc: Ye Ting Cc: Fu Siyuan Cc: Wang Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Fu Siyuan --- 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 88b56ae1ce..285a83122e 100644 --- a/MdeModulePkg/Include/Library/HttpLib.h +++ b/MdeModulePkg/Include/Library/HttpLib.h @@ -286,8 +286,9 @@ HttpInitMsgParser ( @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 diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c index e53dce5e1b..edb2acbd06 100644 --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c @@ -155,7 +155,7 @@ NetHttpParseAuthorityChar ( @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 @@ -572,7 +572,7 @@ 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); @@ -635,7 +635,7 @@ HttpUrlGetIp6 ( Parser = (HTTP_URL_PARSER*) UrlParser; if ((Parser->FieldBitMap & BIT (HTTP_URI_FIELD_HOST)) == 0) { - return EFI_INVALID_PARAMETER; + return EFI_NOT_FOUND; } // @@ -714,7 +714,7 @@ HttpUrlGetPort ( 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); @@ -1133,7 +1133,8 @@ HttpInitMsgParser ( @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 -- 2.39.2