diff options
author | Nagaraj Hegde <nagaraj-p.hegde@hpe.com> | 2016-04-04 18:09:28 +0800 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2016-04-27 10:43:18 +0800 |
commit | 19c25725606b848986f29bb3a216857146fdacb9 (patch) | |
tree | 56396ecae9b2c2cbafb4f9ee8b5e2395f745a68f /NetworkPkg/HttpUtilitiesDxe | |
parent | e297a0a498139cedca232aff69c41c8996151f0b (diff) | |
download | edk2-platforms-19c25725606b848986f29bb3a216857146fdacb9.tar.xz |
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>
Diffstat (limited to 'NetworkPkg/HttpUtilitiesDxe')
-rw-r--r-- | NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c index 739d3b753c..645fca4084 100644 --- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c +++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c @@ -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
|