From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 9703E2095DE48 for ; Thu, 10 Aug 2017 04:12:58 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 10 Aug 2017 04:15:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,352,1498546800"; d="scan'208";a="1002095637" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 10 Aug 2017 04:04:15 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 10 Aug 2017 01:33:07 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 10 Aug 2017 01:23:37 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.236]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.114]) with mapi id 14.03.0319.002; Thu, 10 Aug 2017 15:48:07 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Jin, Eric" Thread-Topic: [Patch] NetworkPkg/HttpDxe: Handle the HttpVersionUnsupported in the HttpConfigData Thread-Index: AQHTELg0N+Rb8CnAqUea7/6dOJKiQaJ9N/sg Date: Thu, 10 Aug 2017 07:48:06 +0000 Message-ID: References: <1502246134-2172-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1502246134-2172-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] 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: Thu, 10 Aug 2017 11:12:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Jiaxin, I think it might be better to use >=3D to reject other invalid value of HTT= P version. Any different opinion?=20 Thanks, Ting -----Original Message----- From: Wu, Jiaxin=20 Sent: Wednesday, August 09, 2017 10:36 AM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Jin, Eric ; Wu, Jiaxi= n Subject: [Patch] NetworkPkg/HttpDxe: Handle the HttpVersionUnsupported in t= he HttpConfigData 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..442397c 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=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