From nobody Thu May 9 09:26:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94819+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94819+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1665178492; cv=none; d=zohomail.com; s=zohoarc; b=HavOWHOLMRuAY0SxMZ4LBVMv9FxapTk+BBbSwJyEQ4EpsFbLDD8foVSJ9bMXOivQ0LYFV/fHn1rfC8ZNAgmMbI3qRF1Smg26jZtv/NTi8i3bdljs2Nl+wobXULrNgbjrVqnKdXP37UYxMjCq6rUPqk1m0Zbd48RZ4CC0WtCmtXQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665178492; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=6gQLbfNB9n7N6CgAp9aPSpOfj5QnmVOTK/XKMyGYWVU=; b=T+slWuU7L8rRSvGXhAa4oPbU95gNJRpt/zhHh8IGkK5pJVdizJcUnZTSPBYWQWyay/t4rjS4QeYM+GGyBTSYeubNzm5eWXV5kkVFTVnAgFEd8+/t6H85HChUAJfnt4I0zRYwCAmlz046i1MJtnkcKFflFUSKor8QXcrBjunYAIo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94819+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665178492250172.30022626037612; Fri, 7 Oct 2022 14:34:52 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qY5pYY1788612xTHQmd5lCgm; Fri, 07 Oct 2022 14:34:51 -0700 X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.262.1665178478972669259 for ; Fri, 07 Oct 2022 14:34:45 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="287069115" X-IronPort-AV: E=Sophos;i="5.95,167,1661842800"; d="scan'208";a="287069115" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 14:34:45 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="658479399" X-IronPort-AV: E=Sophos;i="5.95,167,1661842800"; d="scan'208";a="658479399" X-Received: from fmbiosdev02.amr.corp.intel.com ([10.80.127.10]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 14:34:45 -0700 From: "Saloni Kasbekar" To: devel@edk2.groups.io Cc: Saloni Kasbekar , Maciej Rabeda , Wu Jiaxin , Siyuan Fu Subject: [edk2-devel] [[edk2-staging/HttpProxy PATCH v2] 5/6] NetworkPkg: Add support for HTTP CONNECT Method Date: Fri, 7 Oct 2022 14:34:29 -0700 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,saloni.kasbekar@intel.com X-Gm-Message-State: xBIVVOVbjewjbTOPW12YSpYIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665178491; bh=T+M+hgWSe1A3RaL2oy0azzKKF7DO6IjxlULxCIsrHvM=; h=Cc:Date:From:Reply-To:Subject:To; b=K2+kbKmmEJVfXhyumLV2ceYHnnSRgXDizBcQQU76YgM/FnctPD+p77TA+MzbPWhfTgk GqvFQGfgs2OGPc9C3PZl1mJjEF/ZGRaJPrnTmDL3TtsBTV/r/SdrPdgDznB9NPhnWwni2 RCz2eqZjKrpx66g48fEBQaN7PkhTMQk5VvE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665178494062100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3951 Add support for the HTTP CONNECT method to request the Proxy Server to open a tunnel to the EndPoint Server Cc: Maciej Rabeda Cc: Wu Jiaxin Cc: Siyuan Fu Signed-off-by: Saloni Kasbekar --- NetworkPkg/HttpBootDxe/HttpBootClient.c | 176 +++++++++++++++++++++ NetworkPkg/HttpBootDxe/HttpBootClient.h | 15 ++ NetworkPkg/HttpBootDxe/HttpBootImpl.c | 16 +- NetworkPkg/HttpBootDxe/HttpBootImpl.h | 1 + NetworkPkg/HttpDxe/HttpDriver.h | 2 + NetworkPkg/HttpDxe/HttpDxe.inf | 1 + NetworkPkg/HttpDxe/HttpImpl.c | 151 ++++++++++++++---- NetworkPkg/Library/DxeHttpLib/DxeHttpLib.c | 5 + 8 files changed, 335 insertions(+), 32 deletions(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootD= xe/HttpBootClient.c index b13155b576..b4d02eaff2 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootClient.c +++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c @@ -905,6 +905,182 @@ HttpBootGetBootFileCallback ( return EFI_SUCCESS; } =20 +/** + This function establishes a connection through a proxy server + + @param[in] Private The pointer to the driver's private dat= a. + + @retval EFI_SUCCESS Connection successful. + @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources + @retval Others Unexpected error happened. + +**/ +EFI_STATUS +HttpBootConnectProxy ( + IN HTTP_BOOT_PRIVATE_DATA *Private + ) +{ + EFI_STATUS Status; + EFI_HTTP_STATUS_CODE StatusCode; + CHAR8 *HostName; + EFI_HTTP_REQUEST_DATA *RequestData; + HTTP_IO_RESPONSE_DATA *ResponseData; + HTTP_IO *HttpIo; + HTTP_IO_HEADER *HttpIoHeader; + CHAR16 *Url; + CHAR16 *ProxyUrl; + UINTN UrlSize; + + Url =3D NULL; + ProxyUrl =3D NULL; + RequestData =3D NULL; + ResponseData =3D NULL; + HttpIoHeader =3D NULL; + + UrlSize =3D AsciiStrSize (Private->BootFileUri); + Url =3D AllocatePool (UrlSize * sizeof (CHAR16)); + if (Url =3D=3D NULL) { + return EFI_OUT_OF_RESOURCES; + } + + AsciiStrToUnicodeStrS (Private->BootFileUri, Url, UrlSize); + + UrlSize =3D AsciiStrSize (Private->ProxyUri); + ProxyUrl =3D AllocatePool (UrlSize * (sizeof (CHAR16))); + if (ProxyUrl =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; + goto EXIT; + } + + AsciiStrToUnicodeStrS (Private->ProxyUri, ProxyUrl, UrlSize); + + // + // Send HTTP request message. + // + + // + // Build HTTP header for the request, 2 headers are needed to send a CON= NECT method: + // Host + // User + // + HttpIoHeader =3D HttpIoCreateHeader (2); + if (HttpIoHeader =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; + goto EXIT; + } + + // + // Add HTTP header field 1: Host (EndPoint URI) + // + HostName =3D NULL; + Status =3D HttpUrlGetHostName ( + Private->BootFileUri, + Private->BootFileUriParser, + &HostName + ); + if (EFI_ERROR (Status)) { + goto EXIT; + } + + Status =3D HttpIoSetHeader ( + HttpIoHeader, + HTTP_HEADER_HOST, + HostName + ); + if (EFI_ERROR (Status)) { + goto EXIT; + } + + // + // Add HTTP header field 2: User-Agent + // + Status =3D HttpIoSetHeader ( + HttpIoHeader, + HTTP_HEADER_USER_AGENT, + HTTP_USER_AGENT_EFI_HTTP_BOOT + ); + if (EFI_ERROR (Status)) { + goto EXIT; + } + + // + // Build the rest of HTTP request info. + // + RequestData =3D AllocatePool (sizeof (EFI_HTTP_REQUEST_DATA)); + if (RequestData =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; + goto EXIT; + } + + RequestData->Method =3D HttpMethodConnect; + RequestData->ProxyUrl =3D ProxyUrl; + RequestData->Url =3D Url; + + // + // Send out the request to HTTP server. + // + HttpIo =3D &Private->HttpIo; + Status =3D HttpIoSendRequest ( + HttpIo, + RequestData, + HttpIoHeader->HeaderCount, + HttpIoHeader->Headers, + 0, + NULL + ); + if (EFI_ERROR (Status)) { + goto EXIT; + } + + // + // Receive HTTP response message. + // + + // + // Use zero BodyLength to only receive the response headers. + // + ResponseData =3D AllocateZeroPool (sizeof (HTTP_IO_RESPONSE_DATA)); + if (ResponseData =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; + goto EXIT; + } + + Status =3D HttpIoRecvResponse ( + &Private->HttpIo, + TRUE, + ResponseData + ); + + if (EFI_ERROR (Status) || EFI_ERROR (ResponseData->Status)) { + if (EFI_ERROR (ResponseData->Status)) { + StatusCode =3D HttpIo->RspToken.Message->Data.Response->StatusCode; + HttpBootPrintErrorMessage (StatusCode); + Status =3D ResponseData->Status; + } + } + +EXIT: + if (ResponseData !=3D NULL) { + FreePool (ResponseData); + } + + if (RequestData !=3D NULL) { + FreePool (RequestData); + } + + HttpIoFreeHeader (HttpIoHeader); + + if (ProxyUrl !=3D NULL) { + FreePool (ProxyUrl); + } + + if (Url !=3D NULL) { + FreePool (Url); + } + + return Status; +} + /** This function download the boot file by using UEFI HTTP protocol. =20 diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.h b/NetworkPkg/HttpBootD= xe/HttpBootClient.h index 2fba713679..fcd624f536 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootClient.h +++ b/NetworkPkg/HttpBootDxe/HttpBootClient.h @@ -86,6 +86,21 @@ HttpBootCreateHttpIo ( IN HTTP_BOOT_PRIVATE_DATA *Private ); =20 +/** + This function establishes a connection through a proxy server + + @param[in] Private The pointer to the driver's private dat= a. + + @retval EFI_SUCCESS Connection successful. + @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources + @retval Others Unexpected error happened. + +**/ +EFI_STATUS +HttpBootConnectProxy ( + IN HTTP_BOOT_PRIVATE_DATA *Private + ); + /** This function download the boot file by using UEFI HTTP protocol. =20 diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe= /HttpBootImpl.c index 4748de0603..d4a7c8385a 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c @@ -313,7 +313,11 @@ HttpBootGetBootFileCaller ( EFI_STATUS Status; =20 if (Private->BootFileSize =3D=3D 0) { - State =3D GetBootFileHead; + if (Private->ProxyUri !=3D NULL) { + State =3D ConnectToProxy; + } else { + State =3D GetBootFileHead; + } } else { State =3D LoadBootFile; } @@ -366,6 +370,16 @@ HttpBootGetBootFileCaller ( =20 break; =20 + case ConnectToProxy: + Status =3D HttpBootConnectProxy (Private); + if (Status =3D=3D EFI_SUCCESS) { + State =3D GetBootFileHead; + } else { + State =3D GetBootFileError; + } + + break; + case LoadBootFile: if (*BufferSize < Private->BootFileSize) { *BufferSize =3D Private->BootFileSize; diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.h b/NetworkPkg/HttpBootDxe= /HttpBootImpl.h index 33da4fec51..e4ffc3ed48 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.h +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.h @@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef enum { GetBootFileHead, GetBootFileGet, + ConnectToProxy, LoadBootFile, GetBootFileError } HTTP_GET_BOOT_FILE_STATE; diff --git a/NetworkPkg/HttpDxe/HttpDriver.h b/NetworkPkg/HttpDxe/HttpDrive= r.h index 01a6bb7f4b..e0917f431e 100644 --- a/NetworkPkg/HttpDxe/HttpDriver.h +++ b/NetworkPkg/HttpDxe/HttpDriver.h @@ -26,6 +26,7 @@ #include #include #include +#include =20 // // UEFI Driver Model Protocols @@ -64,6 +65,7 @@ // Driver Version // #define HTTP_DRIVER_VERSION 0xa +#define URI_STR_MAX_SIZE 255 =20 // // Protocol instances diff --git a/NetworkPkg/HttpDxe/HttpDxe.inf b/NetworkPkg/HttpDxe/HttpDxe.inf index c9502d0bb6..30b7de1951 100644 --- a/NetworkPkg/HttpDxe/HttpDxe.inf +++ b/NetworkPkg/HttpDxe/HttpDxe.inf @@ -47,6 +47,7 @@ NetLib HttpLib DpcLib + PrintLib =20 [Protocols] gEfiHttpServiceBindingProtocolGuid ## BY_START diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index a761ce3d5d..2a305e0864 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -234,6 +234,7 @@ EfiHttpRequest ( EFI_HTTP_MESSAGE *HttpMsg; EFI_HTTP_REQUEST_DATA *Request; VOID *UrlParser; + VOID *EndPointUrlParser; EFI_STATUS Status; CHAR8 *HostName; UINTN HostNameSize; @@ -247,25 +248,31 @@ EfiHttpRequest ( UINTN UrlLen; CHAR8 *ProxyUrl; UINTN ProxyUrlLen; + CHAR8 *ParseUrl; CHAR16 *HostNameStr; HTTP_TOKEN_WRAP *Wrap; CHAR8 *FileUrl; UINTN RequestMsgSize; EFI_HANDLE ImageHandle; + UINT16 EndPointRemotePort; + CHAR8 *EndPointUrlMsg; =20 // // Initializations // - Url =3D NULL; - ProxyUrl =3D NULL; - UrlParser =3D NULL; - RemotePort =3D 0; - HostName =3D NULL; - RequestMsg =3D NULL; - HostNameStr =3D NULL; - Wrap =3D NULL; - FileUrl =3D NULL; - TlsConfigure =3D FALSE; + Url =3D NULL; + ProxyUrl =3D NULL; + UrlParser =3D NULL; + EndPointUrlParser =3D NULL; + RemotePort =3D 0; + HostName =3D NULL; + RequestMsg =3D NULL; + HostNameStr =3D NULL; + Wrap =3D NULL; + FileUrl =3D NULL; + TlsConfigure =3D FALSE; + EndPointUrlMsg =3D NULL; + EndPointRemotePort =3D 0; =20 if ((This =3D=3D NULL) || (Token =3D=3D NULL)) { return EFI_INVALID_PARAMETER; @@ -279,7 +286,7 @@ EfiHttpRequest ( Request =3D HttpMsg->Data.Request; =20 // - // Only support GET, HEAD, DELETE, PATCH, PUT and POST method in current= implementation. + // Only support GET, HEAD, DELETE, CONNECT, PATCH, PUT and POST method i= n current implementation. // if (Request !=3D NULL) { switch (Request->Method) { @@ -289,6 +296,12 @@ EfiHttpRequest ( case HttpMethodPut: case HttpMethodPost: case HttpMethodPatch: + break; + case HttpMethodConnect: + if (Request->ProxyUrl =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + break; default: return EFI_UNSUPPORTED; @@ -391,10 +404,14 @@ EfiHttpRequest ( } =20 // - // From the information in Url, the HTTP instance will + // From the information in the Urls, the HTTP instance will // be able to determine whether to use http or https. // - HttpInstance->UseHttps =3D IsHttpsUrl (Url); + if (Request->Method =3D=3D HttpMethodConnect) { + HttpInstance->UseHttps =3D IsHttpsUrl (ProxyUrl); + } else { + HttpInstance->UseHttps =3D IsHttpsUrl (Url); + } =20 // // HTTP is disabled, return directly if the URI is not HTTPS. @@ -431,13 +448,26 @@ EfiHttpRequest ( TlsConfigure =3D TRUE; } =20 - UrlParser =3D NULL; - Status =3D HttpParseUrl (Url, (UINT32)AsciiStrLen (Url), FALSE, &UrlPa= rser); + // + // Setup RemoteAddress and RemotePort of HttpInstance. + // + if (Request->Method =3D=3D HttpMethodConnect) { + // Case 1: HTTP Connect request + ParseUrl =3D ProxyUrl; + } else if (HttpInstance->ProxyConnected =3D=3D TRUE) { + // Case 2: Other HTTP request (proxy connected) + ParseUrl =3D HttpInstance->ProxyUrl; + } else { + // Case 3: Other HTTP request (proxy not connected) + ParseUrl =3D Url; + } + + Status =3D HttpParseUrl (ParseUrl, (UINT32)AsciiStrLen (ParseUrl), FAL= SE, &UrlParser); if (EFI_ERROR (Status)) { goto Error1; } =20 - Status =3D HttpUrlGetHostName (Url, UrlParser, &HostName); + Status =3D HttpUrlGetHostName (ParseUrl, UrlParser, &HostName); if (EFI_ERROR (Status)) { goto Error1; } @@ -455,7 +485,7 @@ EfiHttpRequest ( } } =20 - Status =3D HttpUrlGetPort (Url, UrlParser, &RemotePort); + Status =3D HttpUrlGetPort (ParseUrl, UrlParser, &RemotePort); if (EFI_ERROR (Status)) { if (HttpInstance->UseHttps) { RemotePort =3D HTTPS_DEFAULT_PORT; @@ -551,7 +581,7 @@ EfiHttpRequest ( if (!HttpInstance->LocalAddressIsIPv6) { Status =3D NetLibAsciiStrToIp4 (HostName, &HttpInstance->RemoteAddr); } else { - Status =3D HttpUrlGetIp6 (Url, UrlParser, &HttpInstance->RemoteIpv6A= ddr); + Status =3D HttpUrlGetIp6 (ParseUrl, UrlParser, &HttpInstance->Remote= Ipv6Addr); } =20 if (EFI_ERROR (Status)) { @@ -649,27 +679,74 @@ EfiHttpRequest ( // // Create request message. // - FileUrl =3D Url; - if ((Url !=3D NULL) && (*FileUrl !=3D '/')) { + if (Request->Method =3D=3D HttpMethodConnect) { // - // Convert the absolute-URI to the absolute-path + // HTTP Connect shall contain EndPoint host name in URI // - while (*FileUrl !=3D ':') { - FileUrl++; + Status =3D HttpParseUrl (Url, (UINT32)AsciiStrLen (Url), FALSE, &EndPo= intUrlParser); + if (EFI_ERROR (Status)) { + goto Error3; } =20 - if ((*(FileUrl+1) =3D=3D '/') && (*(FileUrl+2) =3D=3D '/')) { - FileUrl +=3D 3; - while (*FileUrl !=3D '/') { - FileUrl++; + Status =3D HttpUrlGetHostName ( + Url, + EndPointUrlParser, + &HttpInstance->EndPointHostName + ); + if (EFI_ERROR (Status)) { + goto Error3; + } + + Status =3D HttpUrlGetPort (Url, EndPointUrlParser, &EndPointRemotePort= ); + if (EFI_ERROR (Status)) { + if (IsHttpsUrl (Url)) { + EndPointRemotePort =3D HTTPS_DEFAULT_PORT; + } else { + EndPointRemotePort =3D HTTP_DEFAULT_PORT; } - } else { - Status =3D EFI_INVALID_PARAMETER; + } + + EndPointUrlMsg =3D AllocateZeroPool (URI_STR_MAX_SIZE); + if (EndPointUrlMsg =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; goto Error3; } - } =20 - Status =3D HttpGenRequestMessage (HttpMsg, FileUrl, &RequestMsg, &Reques= tMsgSize); + AsciiSPrint ( + EndPointUrlMsg, + URI_STR_MAX_SIZE, + "%a:%d", + HttpInstance->EndPointHostName, + EndPointRemotePort + ); + + Status =3D HttpGenRequestMessage (HttpMsg, EndPointUrlMsg, &RequestMsg= , &RequestMsgSize); + + FreePool (EndPointUrlMsg); + HttpUrlFreeParser (EndPointUrlParser); + } else { + FileUrl =3D Url; + if ((Url !=3D NULL) && (*FileUrl !=3D '/')) { + // + // Convert the absolute-URI to the absolute-path + // + while (*FileUrl !=3D ':') { + FileUrl++; + } + + if ((*(FileUrl+1) =3D=3D '/') && (*(FileUrl+2) =3D=3D '/')) { + FileUrl +=3D 3; + while (*FileUrl !=3D '/') { + FileUrl++; + } + } else { + Status =3D EFI_INVALID_PARAMETER; + goto Error3; + } + } + + Status =3D HttpGenRequestMessage (HttpMsg, FileUrl, &RequestMsg, &Requ= estMsgSize); + } =20 if (EFI_ERROR (Status) || (NULL =3D=3D RequestMsg)) { goto Error3; @@ -705,6 +782,10 @@ EfiHttpRequest ( =20 DispatchDpc (); =20 + if (HttpInstance->Method =3D=3D HttpMethodConnect) { + HttpInstance->ProxyConnected =3D TRUE; + } + if (HostName !=3D NULL) { FreePool (HostName); } @@ -750,6 +831,14 @@ Error2: } =20 Error1: + if (EndPointUrlMsg !=3D NULL) { + FreePool (EndPointUrlMsg); + } + + if (EndPointUrlParser !=3D NULL) { + HttpUrlFreeParser (EndPointUrlParser); + } + if (HostName !=3D NULL) { FreePool (HostName); } diff --git a/NetworkPkg/Library/DxeHttpLib/DxeHttpLib.c b/NetworkPkg/Librar= y/DxeHttpLib/DxeHttpLib.c index 6a5d78629b..45087a1935 100644 --- a/NetworkPkg/Library/DxeHttpLib/DxeHttpLib.c +++ b/NetworkPkg/Library/DxeHttpLib/DxeHttpLib.c @@ -1927,6 +1927,11 @@ HttpGenRequestMessage ( CopyMem (RequestPtr, HTTP_METHOD_DELETE, StrLength); RequestPtr +=3D StrLength; break; + case HttpMethodConnect: + StrLength =3D sizeof (HTTP_METHOD_CONNECT) - 1; + CopyMem (RequestPtr, HTTP_METHOD_CONNECT, StrLength); + RequestPtr +=3D StrLength; + break; default: ASSERT (FALSE); Status =3D EFI_INVALID_PARAMETER; --=20 2.36.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94819): https://edk2.groups.io/g/devel/message/94819 Mute This Topic: https://groups.io/mt/94189620/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-