From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 A2FAB21D1995A for ; Thu, 10 Aug 2017 18:10:26 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Aug 2017 18:12:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,355,1498546800"; d="scan'208";a="136163937" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.140]) by orsmga005.jf.intel.com with ESMTP; 10 Aug 2017 18:12:44 -0700 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Ye Ting , Jin Eric , Wu Jiaxin Date: Fri, 11 Aug 2017 09:12:43 +0800 Message-Id: <1502413963-13936-1-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [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 01:10:26 -0000 v2: * Refine the patch by changing the '==' to '>='. 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 = HTTP_INSTANCE_FROM_PROTOCOL (This); ASSERT (HttpInstance != NULL && HttpInstance->Service != NULL); if (HttpConfigData != NULL) { + if (HttpConfigData->HttpVersion >= HttpVersionUnsupported) { + return EFI_UNSUPPORTED; + } + // // Now configure this HTTP instance. // if (HttpInstance->State != HTTP_STATE_UNCONFIGED) { return EFI_ALREADY_STARTED; -- 1.9.5.msysgit.1