NetworkPkg:HttpDxe:Consume DxeHttpLib API changes

HttpGenRequestString is updated to HttpGenRequestMessage,
with an additional argument. This patch updates the caller
of the DxeHttpLib API. Also, we will avoid adding any '\0'
to the string, which was added to make AsciiStrLen to
work on the string.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Nagaraj Hegde <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
This commit is contained in:
Nagaraj Hegde
2016-04-04 18:09:28 +08:00
committed by Fu Siyuan
parent e297a0a498
commit 19c2572560
3 changed files with 17 additions and 21 deletions

View File

@ -207,11 +207,6 @@ HttpUtilitiesBuild (
StrLength = sizeof("\r\n") - 1;
*NewMessageSize += StrLength;
//
// Final 0 for end flag
//
*NewMessageSize += 1;
*NewMessage = AllocateZeroPool (*NewMessageSize);
if (*NewMessage == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@ -243,9 +238,7 @@ HttpUtilitiesBuild (
CopyMem (NewMessagePtr, "\r\n", StrLength);
NewMessagePtr += StrLength;
*NewMessagePtr = 0;
ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage) + 1);
ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage));
//
// Free allocated buffer