]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpDxe/HttpProto.c
NetworkPkg: Use Http11 definitions in HttpDxe and HttpBootDxe
[mirror_edk2.git] / NetworkPkg / HttpDxe / HttpProto.c
index 9660b6fb67162afd99bfbbb4a6121f8d2431eaf3..579b9e46627070e26ab1f990df973c36f573e4f8 100644 (file)
@@ -2,7 +2,7 @@
   Miscellaneous routines for HttpDxe driver.\r
 \r
 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -2023,7 +2023,7 @@ HttpGenRequestString (
   //\r
   // Calculate HTTP message length.\r
   //\r
-  MsgSize = Message->BodyLength + HTTP_MAXIMUM_METHOD_LEN + AsciiStrLen (Url) + \r
+  MsgSize = Message->BodyLength + HTTP_METHOD_MAXIMUM_LEN + AsciiStrLen (Url) +\r
             AsciiStrLen (HTTP_VERSION_CRLF_STR) + HttpHdrSize;\r
   Request = AllocateZeroPool (MsgSize);\r
   if (Request == NULL) {\r
@@ -2036,13 +2036,13 @@ HttpGenRequestString (
   //\r
   switch (Message->Data.Request->Method) {\r
   case HttpMethodGet:\r
-    StrLength = sizeof (HTTP_GET_STR) - 1;\r
-    CopyMem (RequestPtr, HTTP_GET_STR, StrLength);\r
+    StrLength = sizeof (HTTP_METHOD_GET) - 1;\r
+    CopyMem (RequestPtr, HTTP_METHOD_GET, StrLength);\r
     RequestPtr += StrLength;\r
     break;\r
   case HttpMethodHead:\r
-    StrLength = sizeof (HTTP_HEAD_STR) - 1;\r
-    CopyMem (RequestPtr, HTTP_HEAD_STR, StrLength);\r
+    StrLength = sizeof (HTTP_METHOD_HEAD) - 1;\r
+    CopyMem (RequestPtr, HTTP_METHOD_HEAD, StrLength);\r
     RequestPtr += StrLength;\r
     break;\r
   default:\r
@@ -2050,6 +2050,10 @@ HttpGenRequestString (
     goto Exit;\r
   }\r
 \r
+  StrLength = AsciiStrLen(" ");\r
+  CopyMem (RequestPtr, " ", StrLength);\r
+  RequestPtr += StrLength;\r
+\r
   StrLength = AsciiStrLen (Url);\r
   CopyMem (RequestPtr, Url, StrLength);\r
   RequestPtr += StrLength;\r