summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2017-12-25 16:57:28 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-12-27 16:28:50 +0800
commit4a6f440f259d0fc12b49c49c48b93ad1198cbb86 (patch)
tree6509a9383ab0eb62f0ccf41b1b2b62d068f766a8
parent0efeec8e20e9bf13e5c82622f536df0c13abe331 (diff)
downloadedk2-4a6f440f259d0fc12b49c49c48b93ad1198cbb86.tar.gz
edk2-4a6f440f259d0fc12b49c49c48b93ad1198cbb86.tar.bz2
edk2-4a6f440f259d0fc12b49c49c48b93ad1198cbb86.zip
MdeModulePkg/DxeHttpLib: Correct some return Status.
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> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
-rw-r--r--MdeModulePkg/Include/Library/HttpLib.h5
-rw-r--r--MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c11
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