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:
@ -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
|
||||
|
Reference in New Issue
Block a user