X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FHttpDxe%2FHttpProto.c;h=579b9e46627070e26ab1f990df973c36f573e4f8;hb=fa848a4048943251fc057fe8d6c5a82e01d2ffb6;hp=165e95cc50a9d8290d92f36e00ba15a26af1afbe;hpb=621a618a8c2c12f59c4982340b5cdd9d95d45518;p=mirror_edk2.git diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 165e95cc50..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.
-(C) Copyright 2015 Hewlett Packard Enterprise Development LP
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP
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 @@ -568,13 +568,9 @@ HttpCloseTcpRxEvent ( ) { HTTP_PROTOCOL *HttpInstance; - EFI_TCP4_IO_TOKEN *Rx4Token; - EFI_TCP6_IO_TOKEN *Rx6Token; ASSERT (Wrap != NULL); HttpInstance = Wrap->HttpInstance; - Rx4Token = NULL; - Rx6Token = NULL; if (HttpInstance->LocalAddressIsIPv6) { if (Wrap->TcpWrap.Rx6Token.CompletionToken.Event != NULL) { @@ -2027,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) { @@ -2040,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: @@ -2054,6 +2050,10 @@ HttpGenRequestString ( goto Exit; } + StrLength = AsciiStrLen(" "); + CopyMem (RequestPtr, " ", StrLength); + RequestPtr += StrLength; + StrLength = AsciiStrLen (Url); CopyMem (RequestPtr, Url, StrLength); RequestPtr += StrLength;