From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9C45F21D490F5 for ; Fri, 11 Aug 2017 01:51:39 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 11 Aug 2017 01:53:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,356,1498546800"; d="scan'208";a="122470529" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 11 Aug 2017 01:53:59 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 11 Aug 2017 01:53:50 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.236]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.135]) with mapi id 14.03.0319.002; Fri, 11 Aug 2017 16:53:48 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Jin, Eric" Thread-Topic: [Patch v2] NetworkPkg/HttpDxe: Handle the HttpVersionUnsupported in the HttpConfigData Thread-Index: AQHTEj71/ppLcbZ640umo0oDL52tYqJ+2iAQ Date: Fri, 11 Aug 2017 08:53:48 +0000 Message-ID: References: <1502413963-13936-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1502413963-13936-1-git-send-email-jiaxin.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch v2] NetworkPkg/HttpDxe: Handle the HttpVersionUnsupported in the HttpConfigData X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 08:51:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: Wu, Jiaxin=20 Sent: Friday, August 11, 2017 9:13 AM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Jin, Eric ; Wu, Jiaxi= n Subject: [Patch v2] NetworkPkg/HttpDxe: Handle the HttpVersionUnsupported i= n the HttpConfigData v2: * Refine the patch by changing the '=3D=3D' to '>=3D'. Cc: Ye Ting Cc: Jin Eric Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/HttpDxe/HttpImpl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c = index e0fecac..c104b61 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -149,10 +149,14 @@ EfiHttpConfigure ( HttpInstance =3D HTTP_INSTANCE_FROM_PROTOCOL (This); ASSERT (HttpInstance !=3D NULL && HttpInstance->Service !=3D NULL); =20 if (HttpConfigData !=3D NULL) { =20 + if (HttpConfigData->HttpVersion >=3D HttpVersionUnsupported) { + return EFI_UNSUPPORTED; + } + // // Now configure this HTTP instance. // if (HttpInstance->State !=3D HTTP_STATE_UNCONFIGED) { return EFI_ALREADY_STARTED; -- 1.9.5.msysgit.1