]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DxeHttpLib: Correct some return Status.
authorJiaxin Wu <jiaxin.wu@intel.com>
Mon, 25 Dec 2017 08:57:28 +0000 (16:57 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Wed, 27 Dec 2017 08:28:50 +0000 (16:28 +0800)
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>
MdeModulePkg/Include/Library/HttpLib.h
MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c

index 88b56ae1cebd3ce98b2c66840aaf1813c2ea4252..285a83122e645c9c34d8f35377fcab584cc2c2a8 100644 (file)
@@ -286,8 +286,9 @@ HttpInitMsgParser (
 \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
-\r
+  @retval EFI_ABORTED                Operation aborted.\r
+  @retval Other                      Error happened while parsing message body.\r
+  \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index e53dce5e1bcbadf9917e448bcaab9b2471dece9c..edb2acbd069769bf74842be2dd0ec08dd8753fc9 100644 (file)
@@ -155,7 +155,7 @@ NetHttpParseAuthorityChar (
   @param[in, out]  UrlParser      Pointer to the buffer of the parse result.\r
 \r
   @retval EFI_SUCCESS             Successfully parse the authority.\r
-  @retval Other                   Error happened.\r
+  @retval EFI_INVALID_PARAMETER   The Url is invalid to parse the authority component.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -572,7 +572,7 @@ HttpUrlGetIp4 (
   Parser = (HTTP_URL_PARSER*) UrlParser;\r
 \r
   if ((Parser->FieldBitMap & BIT (HTTP_URI_FIELD_HOST)) == 0) {\r
-    return EFI_INVALID_PARAMETER;\r
+    return EFI_NOT_FOUND;\r
   }\r
 \r
   Ip4String = AllocatePool (Parser->FieldData[HTTP_URI_FIELD_HOST].Length + 1);\r
@@ -635,7 +635,7 @@ HttpUrlGetIp6 (
   Parser = (HTTP_URL_PARSER*) UrlParser;\r
 \r
   if ((Parser->FieldBitMap & BIT (HTTP_URI_FIELD_HOST)) == 0) {\r
-    return EFI_INVALID_PARAMETER;\r
+    return EFI_NOT_FOUND;\r
   }\r
 \r
   //\r
@@ -714,7 +714,7 @@ HttpUrlGetPort (
   Parser = (HTTP_URL_PARSER*) UrlParser;\r
 \r
   if ((Parser->FieldBitMap & BIT (HTTP_URI_FIELD_PORT)) == 0) {\r
-    return EFI_INVALID_PARAMETER;\r
+    return EFI_NOT_FOUND;\r
   }\r
 \r
   PortString = AllocatePool (Parser->FieldData[HTTP_URI_FIELD_PORT].Length + 1);\r
@@ -1133,7 +1133,8 @@ HttpInitMsgParser (
 \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