* [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength
@ 2017-02-08 4:58 Jiaxin Wu
2017-02-08 5:04 ` Fu, Siyuan
2017-02-08 7:01 ` Ye, Ting
0 siblings, 2 replies; 3+ messages in thread
From: Jiaxin Wu @ 2017-02-08 4:58 UTC (permalink / raw)
To: edk2-devel; +Cc: Ye Ting, Fu Siyuan, Wu Jiaxin
Replace AsciiStrDecimalToUintn with AsciiStrDecimalToUintnS to
return the correct status for the HTTP Port/ContentLength.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
index a4579bf..ff7e799 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
@@ -1,10 +1,10 @@
/** @file
This library is used to share code between UEFI network stack modules.
It provides the helper routines to parse the HTTP message byte stream.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at<BR>
http://opensource.org/licenses/bsd-license.php
@@ -719,13 +719,12 @@ HttpUrlGetPort (
if (EFI_ERROR (Status)) {
return Status;
}
PortString[ResultLength] = '\0';
- *Port = (UINT16) AsciiStrDecimalToUintn (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, (UINTN *) Port);
}
/**
Get the Path from a HTTP URL.
@@ -930,12 +929,11 @@ HttpIoParseContentLengthHeader (
Header = HttpFindHeader (HeaderCount, Headers, HTTP_HEADER_CONTENT_LENGTH);
if (Header == NULL) {
return EFI_NOT_FOUND;
}
- *ContentLength = AsciiStrDecimalToUintn (Header->FieldValue);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Header->FieldValue, (CHAR8 **) NULL, ContentLength);
}
/**
Check whether the HTTP message is using the "chunked" transfer-coding.
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength
2017-02-08 4:58 [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength Jiaxin Wu
@ 2017-02-08 5:04 ` Fu, Siyuan
2017-02-08 7:01 ` Ye, Ting
1 sibling, 0 replies; 3+ messages in thread
From: Fu, Siyuan @ 2017-02-08 5:04 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Ye, Ting
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
-----Original Message-----
From: Wu, Jiaxin
Sent: 2017年2月8日 12:58
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength
Replace AsciiStrDecimalToUintn with AsciiStrDecimalToUintnS to return the correct status for the HTTP Port/ContentLength.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
index a4579bf..ff7e799 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
@@ -1,10 +1,10 @@
/** @file
This library is used to share code between UEFI network stack modules.
It provides the helper routines to parse the HTTP message byte stream.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at<BR> http://opensource.org/licenses/bsd-license.php
@@ -719,13 +719,12 @@ HttpUrlGetPort (
if (EFI_ERROR (Status)) {
return Status;
}
PortString[ResultLength] = '\0';
- *Port = (UINT16) AsciiStrDecimalToUintn (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Url +
+ Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, (UINTN
+ *) Port);
}
/**
Get the Path from a HTTP URL.
@@ -930,12 +929,11 @@ HttpIoParseContentLengthHeader (
Header = HttpFindHeader (HeaderCount, Headers, HTTP_HEADER_CONTENT_LENGTH);
if (Header == NULL) {
return EFI_NOT_FOUND;
}
- *ContentLength = AsciiStrDecimalToUintn (Header->FieldValue);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Header->FieldValue, (CHAR8 **) NULL,
+ ContentLength);
}
/**
Check whether the HTTP message is using the "chunked" transfer-coding.
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength
2017-02-08 4:58 [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength Jiaxin Wu
2017-02-08 5:04 ` Fu, Siyuan
@ 2017-02-08 7:01 ` Ye, Ting
1 sibling, 0 replies; 3+ messages in thread
From: Ye, Ting @ 2017-02-08 7:01 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Fu, Siyuan
Reviewed-by: Ye Ting <ting.ye@intel.com>
-----Original Message-----
From: Wu, Jiaxin
Sent: Wednesday, February 08, 2017 12:58 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength
Replace AsciiStrDecimalToUintn with AsciiStrDecimalToUintnS to return the correct status for the HTTP Port/ContentLength.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
index a4579bf..ff7e799 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
@@ -1,10 +1,10 @@
/** @file
This library is used to share code between UEFI network stack modules.
It provides the helper routines to parse the HTTP message byte stream.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at<BR> http://opensource.org/licenses/bsd-license.php
@@ -719,13 +719,12 @@ HttpUrlGetPort (
if (EFI_ERROR (Status)) {
return Status;
}
PortString[ResultLength] = '\0';
- *Port = (UINT16) AsciiStrDecimalToUintn (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Url +
+ Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, (UINTN
+ *) Port);
}
/**
Get the Path from a HTTP URL.
@@ -930,12 +929,11 @@ HttpIoParseContentLengthHeader (
Header = HttpFindHeader (HeaderCount, Headers, HTTP_HEADER_CONTENT_LENGTH);
if (Header == NULL) {
return EFI_NOT_FOUND;
}
- *ContentLength = AsciiStrDecimalToUintn (Header->FieldValue);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Header->FieldValue, (CHAR8 **) NULL,
+ ContentLength);
}
/**
Check whether the HTTP message is using the "chunked" transfer-coding.
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-08 7:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08 4:58 [Patch] MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength Jiaxin Wu
2017-02-08 5:04 ` Fu, Siyuan
2017-02-08 7:01 ` Ye, Ting
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox