summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpDxe/HttpProto.c
diff options
context:
space:
mode:
authorSamer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>2016-02-19 06:47:36 +0800
committerFu Siyuan <siyuan.fu@intel.com>2016-02-25 15:02:31 +0800
commit90f658c460736462d8955c0be7e4c0fa57097586 (patch)
tree3e9f1a7178c76fe6077dc58e377e4854b4d4d810 /NetworkPkg/HttpDxe/HttpProto.c
parent003f3c00d819e3a072133e0dbb7ca896cc87871b (diff)
downloadedk2-90f658c460736462d8955c0be7e4c0fa57097586.tar.gz
edk2-90f658c460736462d8955c0be7e4c0fa57097586.tar.bz2
edk2-90f658c460736462d8955c0be7e4c0fa57097586.zip
NetworkPkg: Use Http11 definitions in HttpDxe and HttpBootDxe
Change HttpDxe and HttpBootDxe to use the standard definitions from Http11.h instead of private duplicate definitions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpProto.c')
-rw-r--r--NetworkPkg/HttpDxe/HttpProto.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c
index 9660b6fb67..579b9e4662 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -2,7 +2,7 @@
Miscellaneous routines for HttpDxe driver.
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
-(C) Copyright 2015 Hewlett Packard Enterprise Development LP<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
@@ -2023,7 +2023,7 @@ HttpGenRequestString (
//
// Calculate HTTP message length.
//
- MsgSize = Message->BodyLength + HTTP_MAXIMUM_METHOD_LEN + AsciiStrLen (Url) +
+ MsgSize = Message->BodyLength + HTTP_METHOD_MAXIMUM_LEN + AsciiStrLen (Url) +
AsciiStrLen (HTTP_VERSION_CRLF_STR) + HttpHdrSize;
Request = AllocateZeroPool (MsgSize);
if (Request == NULL) {
@@ -2036,13 +2036,13 @@ HttpGenRequestString (
//
switch (Message->Data.Request->Method) {
case HttpMethodGet:
- StrLength = sizeof (HTTP_GET_STR) - 1;
- CopyMem (RequestPtr, HTTP_GET_STR, StrLength);
+ StrLength = sizeof (HTTP_METHOD_GET) - 1;
+ CopyMem (RequestPtr, HTTP_METHOD_GET, StrLength);
RequestPtr += StrLength;
break;
case HttpMethodHead:
- StrLength = sizeof (HTTP_HEAD_STR) - 1;
- CopyMem (RequestPtr, HTTP_HEAD_STR, StrLength);
+ StrLength = sizeof (HTTP_METHOD_HEAD) - 1;
+ CopyMem (RequestPtr, HTTP_METHOD_HEAD, StrLength);
RequestPtr += StrLength;
break;
default:
@@ -2050,6 +2050,10 @@ HttpGenRequestString (
goto Exit;
}
+ StrLength = AsciiStrLen(" ");
+ CopyMem (RequestPtr, " ", StrLength);
+ RequestPtr += StrLength;
+
StrLength = AsciiStrLen (Url);
CopyMem (RequestPtr, Url, StrLength);
RequestPtr += StrLength;